2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2016 - 2017 AT&T
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 /* Licensed to the Apache Software Foundation (ASF) under one or more
22 * contributor license agreements. See the NOTICE file distributed with
23 * this work for additional information regarding copyright ownership.
24 * The ASF licenses this file to You under the Apache License, Version 2.0
25 * (the "License"); you may not use this file except in compliance with
26 * the License. You may obtain a copy of the License at
28 * http://www.apache.org/licenses/LICENSE-2.0
30 * Unless required by applicable law or agreed to in writing, software
31 * distributed under the License is distributed on an "AS IS" BASIS,
32 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
33 * See the License for the specific language governing permissions and
34 * limitations under the License.
36 package org.apache.tomcat.jdbc.pool.jmx;
38 import org.apache.tomcat.jdbc.pool.PoolConfiguration;
40 public interface ConnectionPoolMBean extends PoolConfiguration {
42 //=================================================================
44 //=================================================================
50 public int getActive();
52 public int getNumIdle();
54 public int getNumActive();
56 public int getWaitCount();
58 public long getBorrowedCount();
60 public long getReturnedCount();
62 public long getCreatedCount();
64 public long getReleasedCount();
66 public long getReconnectedCount();
68 public long getRemoveAbandonedCount();
70 public long getReleasedIdleCount();
72 //=================================================================
74 //=================================================================
75 public void checkIdle();
77 public void checkAbandoned();
79 public void testIdle();
82 * Purges all connections in the pool.
83 * For connections currently in use, these connections will be
84 * purged when returned on the pool. This call also
85 * purges connections that are idle and in the pool
86 * To only purge used/active connections see {@link #purgeOnReturn()}
91 * Purges connections when they are returned from the pool.
92 * This call does not purge idle connections until they are used.
93 * To purge idle connections see {@link #purge()}
95 public void purgeOnReturn();
98 * reset the statistics of this pool.
100 public void resetStats();
102 //=================================================================
103 // POOL NOTIFICATIONS
104 //=================================================================