001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.commons.dbcp2;
018
019/**
020 * Defines the methods that will be made available via JMX.
021 *
022 * @since 2.0
023 */
024public interface BasicDataSourceMXBean {
025
026    /**
027     * See {@link BasicDataSource#getAbandonedUsageTracking()}
028     * @return {@link BasicDataSource#getAbandonedUsageTracking()}
029     */
030    boolean getAbandonedUsageTracking();
031
032    /**
033     * See {@link BasicDataSource#getDefaultAutoCommit()}
034     * @return {@link BasicDataSource#getDefaultAutoCommit()}
035     */
036    Boolean getDefaultAutoCommit();
037
038    /**
039     * See {@link BasicDataSource#getDefaultReadOnly()}
040     * @return {@link BasicDataSource#getDefaultReadOnly()}
041     */
042    Boolean getDefaultReadOnly();
043
044    /**
045     * See {@link BasicDataSource#getDefaultTransactionIsolation()}
046     * @return {@link BasicDataSource#getDefaultTransactionIsolation()}
047     */
048    int getDefaultTransactionIsolation();
049
050    /**
051     * See {@link BasicDataSource#getDefaultCatalog()}
052     * @return {@link BasicDataSource#getDefaultCatalog()}
053     */
054    String getDefaultCatalog();
055
056    /**
057     * See {@link BasicDataSource#getCacheState()}
058     * @return {@link BasicDataSource#getCacheState()}
059     */
060    boolean getCacheState();
061
062    /**
063     * See {@link BasicDataSource#getDriverClassName()}
064     * @return {@link BasicDataSource#getDriverClassName()}
065     */
066    String getDriverClassName();
067
068    /**
069     * See {@link BasicDataSource#getLifo()}
070     * @return {@link BasicDataSource#getLifo()}
071     */
072    boolean getLifo();
073
074    /**
075     * See {@link BasicDataSource#getMaxTotal()}
076     * @return {@link BasicDataSource#getMaxTotal()}
077     */
078    int getMaxTotal();
079
080    /**
081     * See {@link BasicDataSource#getMaxIdle()}
082     * @return {@link BasicDataSource#getMaxIdle()}
083     */
084    int getMaxIdle();
085
086    /**
087     * See {@link BasicDataSource#getMinIdle()}
088     * @return {@link BasicDataSource#getMinIdle()}
089     */
090    int getMinIdle();
091
092    /**
093     * See {@link BasicDataSource#getInitialSize()}
094     * @return {@link BasicDataSource#getInitialSize()}
095     */
096    int getInitialSize();
097
098    /**
099     * See {@link BasicDataSource#getMaxWaitMillis()}
100     * @return {@link BasicDataSource#getMaxWaitMillis()}
101     */
102    long getMaxWaitMillis();
103
104    /**
105     * See {@link BasicDataSource#isPoolPreparedStatements()}
106     * @return {@link BasicDataSource#isPoolPreparedStatements()}
107     */
108    boolean isPoolPreparedStatements();
109
110    /**
111     * See {@link BasicDataSource#getMaxOpenPreparedStatements()}
112     * @return {@link BasicDataSource#getMaxOpenPreparedStatements()}
113     */
114    int getMaxOpenPreparedStatements();
115
116    /**
117     * See {@link BasicDataSource#getTestOnCreate()}
118     * @return {@link BasicDataSource#getTestOnCreate()}
119     */
120    boolean getTestOnCreate();
121
122    /**
123     * See {@link BasicDataSource#getTestOnBorrow()}
124     * @return {@link BasicDataSource#getTestOnBorrow()}
125     */
126    boolean getTestOnBorrow();
127
128    /**
129     * See {@link BasicDataSource#getTimeBetweenEvictionRunsMillis()}
130     * @return {@link BasicDataSource#getTimeBetweenEvictionRunsMillis()}
131     */
132    long getTimeBetweenEvictionRunsMillis();
133
134    /**
135     * See {@link BasicDataSource#getNumTestsPerEvictionRun()}
136     * @return {@link BasicDataSource#getNumTestsPerEvictionRun()}
137     */
138    int getNumTestsPerEvictionRun();
139
140    /**
141     * See {@link BasicDataSource#getMinEvictableIdleTimeMillis()}
142     * @return {@link BasicDataSource#getMinEvictableIdleTimeMillis()}
143     */
144    long getMinEvictableIdleTimeMillis();
145
146    /**
147     * See {@link BasicDataSource#getSoftMinEvictableIdleTimeMillis()}
148     * @return {@link BasicDataSource#getSoftMinEvictableIdleTimeMillis()}
149     */
150    long getSoftMinEvictableIdleTimeMillis();
151
152    /**
153     * See {@link BasicDataSource#getTestWhileIdle()}
154     * @return {@link BasicDataSource#getTestWhileIdle()}
155     */
156    boolean getTestWhileIdle();
157
158    /**
159     * See {@link BasicDataSource#getNumActive()}
160     * @return {@link BasicDataSource#getNumActive()}
161     */
162    int getNumActive();
163
164    /**
165     * See {@link BasicDataSource#getNumIdle()}
166     * @return {@link BasicDataSource#getNumIdle()}
167     */
168    int getNumIdle();
169
170    /**
171     * See {@link BasicDataSource#getPassword()}
172     * @return {@link BasicDataSource#getPassword()}
173     */
174    String getPassword();
175
176    /**
177     * See {@link BasicDataSource#getUrl()}
178     * @return {@link BasicDataSource#getUrl()}
179     */
180    String getUrl();
181
182    /**
183     * See {@link BasicDataSource#getUsername()}
184     * @return {@link BasicDataSource#getUsername()}
185     */
186    String getUsername();
187
188    /**
189     * See {@link BasicDataSource#getValidationQuery()}
190     * @return {@link BasicDataSource#getValidationQuery()}
191     */
192    String getValidationQuery();
193
194    /**
195     * See {@link BasicDataSource#getValidationQueryTimeout()}
196     * @return {@link BasicDataSource#getValidationQueryTimeout()}
197     */
198    int getValidationQueryTimeout();
199
200    /**
201     * See {@link BasicDataSource#getConnectionInitSqlsAsArray()}
202     * @return {@link BasicDataSource#getConnectionInitSqlsAsArray()}
203     */
204    String[] getConnectionInitSqlsAsArray();
205
206    /**
207     * See {@link BasicDataSource#isAccessToUnderlyingConnectionAllowed()}
208     * @return {@link BasicDataSource#isAccessToUnderlyingConnectionAllowed()}
209     */
210    boolean isAccessToUnderlyingConnectionAllowed();
211
212    /**
213     * See {@link BasicDataSource#getMaxConnLifetimeMillis()}
214     * @return {@link BasicDataSource#getMaxConnLifetimeMillis()}
215     */
216    long getMaxConnLifetimeMillis();
217
218    /**
219     * See {@link BasicDataSource#getLogExpiredConnections()}
220     * @return {@link BasicDataSource#getLogExpiredConnections()}
221     * @since 2.1
222     */
223    boolean getLogExpiredConnections();
224
225    /**
226     * See {@link BasicDataSource#getRemoveAbandonedOnBorrow()}
227     * @return {@link BasicDataSource#getRemoveAbandonedOnBorrow()}
228     */
229    boolean getRemoveAbandonedOnBorrow();
230
231    /**
232     * See {@link BasicDataSource#getRemoveAbandonedOnMaintenance()}
233     * @return {@link BasicDataSource#getRemoveAbandonedOnMaintenance()}
234     */
235    boolean getRemoveAbandonedOnMaintenance();
236
237    /**
238     * See {@link BasicDataSource#getRemoveAbandonedTimeout()}
239     * @return {@link BasicDataSource#getRemoveAbandonedTimeout()}
240     */
241    int getRemoveAbandonedTimeout();
242
243    /**
244     * See {@link BasicDataSource#getLogAbandoned()}
245     * @return {@link BasicDataSource#getLogAbandoned()}
246     */
247    boolean getLogAbandoned();
248
249    /**
250     * See {@link BasicDataSource#isClosed()}
251     * @return {@link BasicDataSource#isClosed()}
252     */
253    boolean isClosed();
254
255    /**
256     * See {@link BasicDataSource#getFastFailValidation()}
257     * @return {@link BasicDataSource#getFastFailValidation()}
258     * @since 2.1
259     */
260    boolean getFastFailValidation();
261
262    /**
263     * See {@link BasicDataSource#getDisconnectionSqlCodesAsArray()}
264     * @return {@link BasicDataSource#getDisconnectionSqlCodesAsArray()}
265     * @since 2.1
266     */
267    String[] getDisconnectionSqlCodesAsArray();
268}