Package org.apache.commons.dbcp2
Interface DataSourceMXBean
- All Known Subinterfaces:
BasicDataSourceMXBean
- All Known Implementing Classes:
BasicDataSource
,BasicManagedDataSource
public interface DataSourceMXBean
Defines the methods that will be made available via
JMX.
- Since:
- 2.9.0
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
String[]
default String
int
String[]
boolean
int
boolean
getLifo()
boolean
boolean
long
int
int
int
long
long
int
int
int
int
boolean
boolean
int
long
boolean
boolean
boolean
long
getUrl()
Deprecated.default String
int
boolean
default boolean
boolean
isClosed()
boolean
default void
restart()
default void
start()
-
Method Details
-
getAbandonedUsageTracking
boolean getAbandonedUsageTracking() -
getCacheState
boolean getCacheState()- Returns:
BasicDataSource.getCacheState()
.
-
getConnectionInitSqlsAsArray
-
getDefaultAutoCommit
- Returns:
BasicDataSource.getDefaultAutoCommit()
.
-
getDefaultCatalog
- Returns:
BasicDataSource.getDefaultCatalog()
.
-
getDefaultReadOnly
- Returns:
BasicDataSource.getDefaultReadOnly()
.
-
getDefaultSchema
- Returns:
BasicDataSource.getDefaultSchema()
.- Since:
- 2.5.0
-
getDefaultTransactionIsolation
-
getDisconnectionSqlCodesAsArray
- Returns:
BasicDataSource.getDisconnectionSqlCodesAsArray()
.- Since:
- 2.1
-
getDriverClassName
- Returns:
BasicDataSource.getDriverClassName()
.
-
getFastFailValidation
boolean getFastFailValidation()- Returns:
BasicDataSource.getFastFailValidation()
.- Since:
- 2.1
-
getInitialSize
int getInitialSize()- Returns:
BasicDataSource.getInitialSize()
.
-
getLifo
boolean getLifo()- Returns:
BasicDataSource.getLifo()
.
-
getLogAbandoned
boolean getLogAbandoned()- Returns:
BasicDataSource.getLogAbandoned()
.
-
getLogExpiredConnections
boolean getLogExpiredConnections()- Returns:
BasicDataSource.getLogExpiredConnections()
.- Since:
- 2.1
-
getMaxConnLifetimeMillis
long getMaxConnLifetimeMillis() -
getMaxIdle
int getMaxIdle()- Returns:
BasicDataSource.getMaxIdle()
.
-
getMaxOpenPreparedStatements
-
getMaxTotal
int getMaxTotal()- Returns:
BasicDataSource.getMaxTotal()
.
-
getMaxWaitMillis
long getMaxWaitMillis()- Returns:
BasicDataSource.getMaxWaitMillis()
.
-
getMinEvictableIdleTimeMillis
-
getMinIdle
int getMinIdle()- Returns:
BasicDataSource.getMinIdle()
.
-
getNumActive
int getNumActive()- Returns:
BasicDataSource.getNumActive()
.
-
getNumIdle
int getNumIdle()- Returns:
BasicDataSource.getNumIdle()
.
-
getNumTestsPerEvictionRun
-
getRemoveAbandonedOnBorrow
boolean getRemoveAbandonedOnBorrow() -
getRemoveAbandonedOnMaintenance
boolean getRemoveAbandonedOnMaintenance() -
getRemoveAbandonedTimeout
-
getSoftMinEvictableIdleTimeMillis
-
getTestOnBorrow
boolean getTestOnBorrow()- Returns:
BasicDataSource.getTestOnBorrow()
.
-
getTestOnCreate
boolean getTestOnCreate()- Returns:
BasicDataSource.getTestOnCreate()
.
-
getTestWhileIdle
boolean getTestWhileIdle()- Returns:
BasicDataSource.getTestWhileIdle()
.
-
getTimeBetweenEvictionRunsMillis
-
getUrl
- Returns:
BasicDataSource.getUrl()
.
-
getUsername
Deprecated.UsegetUserName()
.- Returns:
BasicDataSource.getUsername()
.
-
getUserName
- Returns:
BasicDataSource.getUsername()
.- Since:
- 2.11.0
-
getValidationQuery
- Returns:
BasicDataSource.getValidationQuery()
.
-
getValidationQueryTimeout
-
isAccessToUnderlyingConnectionAllowed
boolean isAccessToUnderlyingConnectionAllowed() -
isClearStatementPoolOnReturn
- Returns:
BasicDataSource.isClearStatementPoolOnReturn()
.- Since:
- 2.8.0
-
isClosed
boolean isClosed()- Returns:
BasicDataSource.isClosed()
.
-
isPoolPreparedStatements
boolean isPoolPreparedStatements() -
restart
- Throws:
SQLException
- if an error occurs initializing the data source.- Since:
- 2.8.0
-
start
- Throws:
SQLException
- if an error occurs initializing the data source.- Since:
- 2.8.0
-
getUserName()
.