Package io.dropwizard.db
Class ManagedPooledDataSource
- java.lang.Object
-
- org.apache.tomcat.jdbc.pool.DataSourceProxy
-
- io.dropwizard.db.ManagedPooledDataSource
-
- All Implemented Interfaces:
ManagedDataSource
,Managed
,Wrapper
,CommonDataSource
,DataSource
,org.apache.tomcat.jdbc.pool.PoolConfiguration
public class ManagedPooledDataSource extends org.apache.tomcat.jdbc.pool.DataSourceProxy implements ManagedDataSource
AManagedDataSource
which is backed by a Tomcat pooledDataSource
.
-
-
Constructor Summary
Constructors Constructor Description ManagedPooledDataSource(org.apache.tomcat.jdbc.pool.PoolConfiguration config, com.codahale.metrics.MetricRegistry metricRegistry)
Create a new data source with the given connection pool configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Logger
getParentLogger()
void
start()
Starts the object.void
stop()
Stops the object.-
Methods inherited from class org.apache.tomcat.jdbc.pool.DataSourceProxy
checkAbandoned, checkIdle, close, close, createPool, getAbandonWhenPercentageFull, getActive, getBorrowedCount, getCommitOnReturn, getConnection, getConnection, getConnectionAsync, getConnectionProperties, getCreatedCount, getDataSource, getDataSourceJNDI, getDbProperties, getDefaultAutoCommit, getDefaultCatalog, getDefaultReadOnly, getDefaultTransactionIsolation, getDriverClassName, getIdle, getInitialSize, getInitSQL, getJdbcInterceptors, getJdbcInterceptorsAsArray, getLoginTimeout, getLogValidationErrors, getLogWriter, getMaxActive, getMaxAge, getMaxIdle, getMaxWait, getMinEvictableIdleTimeMillis, getMinIdle, getName, getNumActive, getNumIdle, getNumTestsPerEvictionRun, getPassword, getPool, getPooledConnection, getPooledConnection, getPoolName, getPoolProperties, getPoolSize, getPropagateInterruptState, getReconnectedCount, getReleasedCount, getReleasedIdleCount, getRemoveAbandonedCount, getRemoveAbandonedTimeout, getReturnedCount, getRollbackOnReturn, getSize, getSuspectTimeout, getTimeBetweenEvictionRunsMillis, getUrl, getUseDisposableConnectionFacade, getUseLock, getUsername, getUseStatementFacade, getValidationInterval, getValidationQuery, getValidationQueryTimeout, getValidator, getValidatorClassName, getWaitCount, getXAConnection, getXAConnection, isAccessToUnderlyingConnectionAllowed, isAlternateUsernameAllowed, isDefaultAutoCommit, isDefaultReadOnly, isFairQueue, isIgnoreExceptionOnPreLoad, isJmxEnabled, isLogAbandoned, isPoolSweeperEnabled, isRemoveAbandoned, isTestOnBorrow, isTestOnConnect, isTestOnReturn, isTestWhileIdle, isUseEquals, isWrapperFor, purge, purgeOnReturn, resetStats, setAbandonWhenPercentageFull, setAccessToUnderlyingConnectionAllowed, setAlternateUsernameAllowed, setCommitOnReturn, setConnectionProperties, setDataSource, setDataSourceJNDI, setDbProperties, setDefaultAutoCommit, setDefaultCatalog, setDefaultReadOnly, setDefaultTransactionIsolation, setDriverClassName, setFairQueue, setIgnoreExceptionOnPreLoad, setInitialSize, setInitSQL, setJdbcInterceptors, setJmxEnabled, setLogAbandoned, setLoginTimeout, setLogValidationErrors, setLogWriter, setMaxActive, setMaxAge, setMaxIdle, setMaxWait, setMinEvictableIdleTimeMillis, setMinIdle, setName, setNumTestsPerEvictionRun, setPassword, setPoolProperties, setPropagateInterruptState, setRemoveAbandoned, setRemoveAbandonedTimeout, setRollbackOnReturn, setSuspectTimeout, setTestOnBorrow, setTestOnConnect, setTestOnReturn, setTestWhileIdle, setTimeBetweenEvictionRunsMillis, setUrl, setUseDisposableConnectionFacade, setUseEquals, setUseLock, setUsername, setUseStatementFacade, setValidationInterval, setValidationQuery, setValidationQueryTimeout, setValidator, setValidatorClassName, testIdle, toString, unwrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder
-
Methods inherited from interface javax.sql.DataSource
createConnectionBuilder, getConnection, getConnection, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
-
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
-
-
-
Constructor Detail
-
ManagedPooledDataSource
public ManagedPooledDataSource(org.apache.tomcat.jdbc.pool.PoolConfiguration config, com.codahale.metrics.MetricRegistry metricRegistry)
Create a new data source with the given connection pool configuration.- Parameters:
config
- the connection pool configuration
-
-
Method Detail
-
getParentLogger
public Logger getParentLogger() throws SQLFeatureNotSupportedException
- Specified by:
getParentLogger
in interfaceCommonDataSource
- Overrides:
getParentLogger
in classorg.apache.tomcat.jdbc.pool.DataSourceProxy
- Throws:
SQLFeatureNotSupportedException
-
start
public void start() throws Exception
Description copied from interface:Managed
Starts the object. Called before the application becomes available. The default implementation is a no-op.
-
-