Package io.dropwizard.db
Class ManagedPooledDataSource
java.lang.Object
org.apache.tomcat.jdbc.pool.DataSourceProxy
io.dropwizard.db.ManagedPooledDataSource
- All Implemented Interfaces:
ManagedDataSource,io.dropwizard.lifecycle.Managed,Wrapper,CommonDataSource,DataSource,org.apache.tomcat.jdbc.pool.PoolConfiguration
public class ManagedPooledDataSource
extends org.apache.tomcat.jdbc.pool.DataSourceProxy
implements ManagedDataSource
A
ManagedDataSource which is backed by a Tomcat pooled DataSource.-
Field Summary
Fields inherited from class org.apache.tomcat.jdbc.pool.DataSourceProxy
pool, poolPropertiesFields inherited from interface org.apache.tomcat.jdbc.pool.PoolConfiguration
PKG_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionManagedPooledDataSource(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
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, unwrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilderMethods inherited from interface javax.sql.DataSource
createConnectionBuilder, getConnection, getConnection, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriterMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Constructor Details
-
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 Details
-
getParentLogger
- Specified by:
getParentLoggerin interfaceCommonDataSource- Overrides:
getParentLoggerin classorg.apache.tomcat.jdbc.pool.DataSourceProxy- Throws:
SQLFeatureNotSupportedException
-
start
- Specified by:
startin interfaceio.dropwizard.lifecycle.Managed- Throws:
Exception
-
stop
- Specified by:
stopin interfaceio.dropwizard.lifecycle.Managed- Throws:
Exception
-