Class AbstractPoolBackedDataSource
- java.lang.Object
-
- com.mchange.v2.c3p0.impl.AbstractIdentityTokenized
-
- com.mchange.v2.c3p0.impl.IdentityTokenResolvable
-
- com.mchange.v2.c3p0.impl.PoolBackedDataSourceBase
-
- com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource
-
- All Implemented Interfaces:
IdentityTokenized,PooledDataSource,java.io.Serializable,java.lang.AutoCloseable,java.sql.Wrapper,javax.naming.Referenceable,javax.sql.CommonDataSource,javax.sql.DataSource
- Direct Known Subclasses:
AbstractComboPooledDataSource,PoolBackedDataSource
public abstract class AbstractPoolBackedDataSource extends PoolBackedDataSourceBase implements PooledDataSource
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.mchange.v2.c3p0.impl.PoolBackedDataSourceBase
pcs, vcs
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPoolBackedDataSource(boolean autoregister)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()C3P0 pooled DataSources use no resources before they are actually used in a VM, and they close themselves in their finalize() method.voidclose(boolean force_destroy)Deprecated.the force_destroy argument is now meaningless, as pools are no longer potentially shared between multiple DataSources.java.util.CollectiongetAllUsers()java.sql.ConnectiongetConnection()java.sql.ConnectiongetConnection(java.lang.String username, java.lang.String password)java.lang.StringgetDataSourceName()floatgetEffectivePropertyCycle(java.lang.String username, java.lang.String password)floatgetEffectivePropertyCycleDefaultUser()java.lang.ThrowablegetLastAcquisitionFailure(java.lang.String username, java.lang.String password)java.lang.ThrowablegetLastAcquisitionFailureDefaultUser()java.lang.ThrowablegetLastCheckinFailure(java.lang.String username, java.lang.String password)java.lang.ThrowablegetLastCheckinFailureDefaultUser()java.lang.ThrowablegetLastCheckoutFailure(java.lang.String username, java.lang.String password)java.lang.ThrowablegetLastCheckoutFailureDefaultUser()java.lang.ThrowablegetLastConnectionTestFailure(java.lang.String username, java.lang.String password)java.lang.ThrowablegetLastConnectionTestFailureDefaultUser()java.lang.ThrowablegetLastIdleTestFailure(java.lang.String username, java.lang.String password)java.lang.ThrowablegetLastIdleTestFailureDefaultUser()intgetLoginTimeout()java.io.PrintWritergetLogWriter()intgetNumBusyConnections()intgetNumBusyConnections(java.lang.String username, java.lang.String password)intgetNumBusyConnectionsAllUsers()intgetNumBusyConnectionsDefaultUser()intgetNumConnections()intgetNumConnections(java.lang.String username, java.lang.String password)intgetNumConnectionsAllUsers()intgetNumConnectionsDefaultUser()longgetNumFailedCheckins(java.lang.String username, java.lang.String password)longgetNumFailedCheckinsDefaultUser()longgetNumFailedCheckouts(java.lang.String username, java.lang.String password)longgetNumFailedCheckoutsDefaultUser()longgetNumFailedIdleTests(java.lang.String username, java.lang.String password)longgetNumFailedIdleTestsDefaultUser()intgetNumIdleConnections()intgetNumIdleConnections(java.lang.String username, java.lang.String password)intgetNumIdleConnectionsAllUsers()intgetNumIdleConnectionsDefaultUser()intgetNumThreadsAwaitingCheckout(java.lang.String username, java.lang.String password)intgetNumThreadsAwaitingCheckoutDefaultUser()intgetNumUnclosedOrphanedConnections()intgetNumUnclosedOrphanedConnections(java.lang.String username, java.lang.String password)intgetNumUnclosedOrphanedConnectionsAllUsers()intgetNumUnclosedOrphanedConnectionsDefaultUser()intgetNumUserPools()longgetStartTimeMillis(java.lang.String username, java.lang.String password)longgetStartTimeMillisDefaultUser()intgetStatementCacheNumCheckedOut(java.lang.String username, java.lang.String password)intgetStatementCacheNumCheckedOutDefaultUser()intgetStatementCacheNumCheckedOutStatementsAllUsers()intgetStatementCacheNumConnectionsWithCachedStatements(java.lang.String username, java.lang.String password)intgetStatementCacheNumConnectionsWithCachedStatementsAllUsers()intgetStatementCacheNumConnectionsWithCachedStatementsDefaultUser()intgetStatementCacheNumStatements(java.lang.String username, java.lang.String password)intgetStatementCacheNumStatementsAllUsers()intgetStatementCacheNumStatementsDefaultUser()intgetStatementDestroyerNumActiveThreads()intgetStatementDestroyerNumConnectionsInUse(java.lang.String username, java.lang.String password)intgetStatementDestroyerNumConnectionsInUseAllUsers()intgetStatementDestroyerNumConnectionsInUseDefaultUser()intgetStatementDestroyerNumConnectionsWithDeferredDestroyStatements(java.lang.String username, java.lang.String password)intgetStatementDestroyerNumConnectionsWithDeferredDestroyStatementsAllUsers()intgetStatementDestroyerNumConnectionsWithDeferredDestroyStatementsDefaultUser()intgetStatementDestroyerNumDeferredDestroyStatements(java.lang.String username, java.lang.String password)intgetStatementDestroyerNumDeferredDestroyStatementsAllUsers()intgetStatementDestroyerNumDeferredDestroyStatementsDefaultUser()intgetStatementDestroyerNumIdleThreads()intgetStatementDestroyerNumTasksPending()intgetStatementDestroyerNumThreads()intgetThreadPoolNumActiveThreads()intgetThreadPoolNumIdleThreads()intgetThreadPoolNumTasksPending()intgetThreadPoolSize()longgetUpTimeMillis(java.lang.String username, java.lang.String password)longgetUpTimeMillisDefaultUser()voidhardReset()Destroys all pooled and checked-out Connections associated with this DataSource immediately.protected voidinitializeNamedConfig(java.lang.String configName, boolean shouldBindUserOverridesAsString)booleanisWrapperFor(java.lang.Class<?> iface)protected booleanisWrapperForThis(java.lang.Class<?> iface)voidresetPoolManager()voidresetPoolManager(boolean close_checked_out_connections)java.lang.StringsampleLastAcquisitionFailureStackTrace(java.lang.String username, java.lang.String password)java.lang.StringsampleLastAcquisitionFailureStackTraceDefaultUser()java.lang.StringsampleLastCheckinFailureStackTrace(java.lang.String username, java.lang.String password)java.lang.StringsampleLastCheckinFailureStackTraceDefaultUser()java.lang.StringsampleLastCheckoutFailureStackTrace(java.lang.String username, java.lang.String password)java.lang.StringsampleLastCheckoutFailureStackTraceDefaultUser()java.lang.StringsampleLastConnectionTestFailureStackTrace(java.lang.String username, java.lang.String password)java.lang.StringsampleLastConnectionTestFailureStackTraceDefaultUser()java.lang.StringsampleLastIdleTestFailureStackTrace(java.lang.String username, java.lang.String password)java.lang.StringsampleLastIdleTestFailureStackTraceDefaultUser()java.lang.StringsampleStatementCacheStatus(java.lang.String username, java.lang.String password)java.lang.StringsampleStatementCacheStatusDefaultUser()java.lang.StringsampleStatementDestroyerStackTraces()java.lang.StringsampleStatementDestroyerStatus()java.lang.StringsampleThreadPoolStackTraces()java.lang.StringsampleThreadPoolStatus()voidsetLoginTimeout(int seconds)voidsetLogWriter(java.io.PrintWriter out)voidsoftReset(java.lang.String username, java.lang.String password)Discards all Connections managed by the PooledDataSource with the specified authentication credentials and reacquires new Connections to populate.voidsoftResetAllUsers()Discards all Connections managed by the PooledDataSource and reacquires new Connections to populate.voidsoftResetDefaultUser()Discards all Connections managed by the PooledDataSource's default-authentication pool and reacquires new Connections to populate.abstract java.lang.StringtoString(boolean show_config)<T> Tunwrap(java.lang.Class<T> iface)-
Methods inherited from class com.mchange.v2.c3p0.impl.PoolBackedDataSourceBase
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, extraToStringInfo, getConnectionPoolDataSource, getExtensions, getFactoryClassLocation, getIdentityToken, getNumHelperThreads, getParentLogger, getPropertyChangeListeners, getPropertyChangeSupport, getReference, getVetoableChangeListeners, getVetoableChangeSupport, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, setConnectionPoolDataSource, setDataSourceName, setExtensions, setFactoryClassLocation, setIdentityToken, setNumHelperThreads, toString
-
Methods inherited from class com.mchange.v2.c3p0.impl.IdentityTokenResolvable
doResolve, readResolve, verifyResolve
-
Methods inherited from class com.mchange.v2.c3p0.impl.AbstractIdentityTokenized
equals, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder, getParentLogger
-
Methods inherited from interface com.mchange.v2.c3p0.PooledDataSource
getExtensions, getIdentityToken, getNumHelperThreads, setDataSourceName, setExtensions
-
-
-
-
Method Detail
-
initializeNamedConfig
protected void initializeNamedConfig(java.lang.String configName, boolean shouldBindUserOverridesAsString)
-
getDataSourceName
public java.lang.String getDataSourceName()
- Specified by:
getDataSourceNamein interfacePooledDataSource- Overrides:
getDataSourceNamein classPoolBackedDataSourceBase
-
getConnection
public java.sql.Connection getConnection() throws java.sql.SQLException- Specified by:
getConnectionin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
getConnection
public java.sql.Connection getConnection(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getConnectionin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
getLogWriter
public java.io.PrintWriter getLogWriter() throws java.sql.SQLException- Specified by:
getLogWriterin interfacejavax.sql.CommonDataSource- Specified by:
getLogWriterin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
setLogWriter
public void setLogWriter(java.io.PrintWriter out) throws java.sql.SQLException- Specified by:
setLogWriterin interfacejavax.sql.CommonDataSource- Specified by:
setLogWriterin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
getLoginTimeout
public int getLoginTimeout() throws java.sql.SQLException- Specified by:
getLoginTimeoutin interfacejavax.sql.CommonDataSource- Specified by:
getLoginTimeoutin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
setLoginTimeout
public void setLoginTimeout(int seconds) throws java.sql.SQLException- Specified by:
setLoginTimeoutin interfacejavax.sql.CommonDataSource- Specified by:
setLoginTimeoutin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
getNumConnections
public int getNumConnections() throws java.sql.SQLException- Specified by:
getNumConnectionsin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumIdleConnections
public int getNumIdleConnections() throws java.sql.SQLException- Specified by:
getNumIdleConnectionsin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumBusyConnections
public int getNumBusyConnections() throws java.sql.SQLException- Specified by:
getNumBusyConnectionsin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumUnclosedOrphanedConnections
public int getNumUnclosedOrphanedConnections() throws java.sql.SQLException- Specified by:
getNumUnclosedOrphanedConnectionsin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumConnectionsDefaultUser
public int getNumConnectionsDefaultUser() throws java.sql.SQLException- Specified by:
getNumConnectionsDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumIdleConnectionsDefaultUser
public int getNumIdleConnectionsDefaultUser() throws java.sql.SQLException- Specified by:
getNumIdleConnectionsDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumBusyConnectionsDefaultUser
public int getNumBusyConnectionsDefaultUser() throws java.sql.SQLException- Specified by:
getNumBusyConnectionsDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumUnclosedOrphanedConnectionsDefaultUser
public int getNumUnclosedOrphanedConnectionsDefaultUser() throws java.sql.SQLException- Specified by:
getNumUnclosedOrphanedConnectionsDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementCacheNumStatementsDefaultUser
public int getStatementCacheNumStatementsDefaultUser() throws java.sql.SQLException- Specified by:
getStatementCacheNumStatementsDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementCacheNumCheckedOutDefaultUser
public int getStatementCacheNumCheckedOutDefaultUser() throws java.sql.SQLException- Specified by:
getStatementCacheNumCheckedOutDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementCacheNumConnectionsWithCachedStatementsDefaultUser
public int getStatementCacheNumConnectionsWithCachedStatementsDefaultUser() throws java.sql.SQLException- Specified by:
getStatementCacheNumConnectionsWithCachedStatementsDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getEffectivePropertyCycleDefaultUser
public float getEffectivePropertyCycleDefaultUser() throws java.sql.SQLException- Specified by:
getEffectivePropertyCycleDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStartTimeMillisDefaultUser
public long getStartTimeMillisDefaultUser() throws java.sql.SQLException- Specified by:
getStartTimeMillisDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getUpTimeMillisDefaultUser
public long getUpTimeMillisDefaultUser() throws java.sql.SQLException- Specified by:
getUpTimeMillisDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumFailedCheckinsDefaultUser
public long getNumFailedCheckinsDefaultUser() throws java.sql.SQLException- Specified by:
getNumFailedCheckinsDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumFailedCheckoutsDefaultUser
public long getNumFailedCheckoutsDefaultUser() throws java.sql.SQLException- Specified by:
getNumFailedCheckoutsDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumFailedIdleTestsDefaultUser
public long getNumFailedIdleTestsDefaultUser() throws java.sql.SQLException- Specified by:
getNumFailedIdleTestsDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumThreadsAwaitingCheckoutDefaultUser
public int getNumThreadsAwaitingCheckoutDefaultUser() throws java.sql.SQLException- Specified by:
getNumThreadsAwaitingCheckoutDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getThreadPoolSize
public int getThreadPoolSize() throws java.sql.SQLException- Specified by:
getThreadPoolSizein interfacePooledDataSource- Throws:
java.sql.SQLException
-
getThreadPoolNumActiveThreads
public int getThreadPoolNumActiveThreads() throws java.sql.SQLException- Specified by:
getThreadPoolNumActiveThreadsin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getThreadPoolNumIdleThreads
public int getThreadPoolNumIdleThreads() throws java.sql.SQLException- Specified by:
getThreadPoolNumIdleThreadsin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getThreadPoolNumTasksPending
public int getThreadPoolNumTasksPending() throws java.sql.SQLException- Specified by:
getThreadPoolNumTasksPendingin interfacePooledDataSource- Throws:
java.sql.SQLException
-
sampleThreadPoolStackTraces
public java.lang.String sampleThreadPoolStackTraces() throws java.sql.SQLException- Specified by:
sampleThreadPoolStackTracesin interfacePooledDataSource- Throws:
java.sql.SQLException
-
sampleThreadPoolStatus
public java.lang.String sampleThreadPoolStatus() throws java.sql.SQLException- Specified by:
sampleThreadPoolStatusin interfacePooledDataSource- Throws:
java.sql.SQLException
-
sampleStatementCacheStatusDefaultUser
public java.lang.String sampleStatementCacheStatusDefaultUser() throws java.sql.SQLException- Specified by:
sampleStatementCacheStatusDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
sampleStatementCacheStatus
public java.lang.String sampleStatementCacheStatus(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
sampleStatementCacheStatusin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getLastAcquisitionFailureDefaultUser
public java.lang.Throwable getLastAcquisitionFailureDefaultUser() throws java.sql.SQLException- Specified by:
getLastAcquisitionFailureDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getLastCheckinFailureDefaultUser
public java.lang.Throwable getLastCheckinFailureDefaultUser() throws java.sql.SQLException- Specified by:
getLastCheckinFailureDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getLastCheckoutFailureDefaultUser
public java.lang.Throwable getLastCheckoutFailureDefaultUser() throws java.sql.SQLException- Specified by:
getLastCheckoutFailureDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getLastIdleTestFailureDefaultUser
public java.lang.Throwable getLastIdleTestFailureDefaultUser() throws java.sql.SQLException- Specified by:
getLastIdleTestFailureDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getLastConnectionTestFailureDefaultUser
public java.lang.Throwable getLastConnectionTestFailureDefaultUser() throws java.sql.SQLException- Specified by:
getLastConnectionTestFailureDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getLastAcquisitionFailure
public java.lang.Throwable getLastAcquisitionFailure(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getLastAcquisitionFailurein interfacePooledDataSource- Throws:
java.sql.SQLException
-
getLastCheckinFailure
public java.lang.Throwable getLastCheckinFailure(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getLastCheckinFailurein interfacePooledDataSource- Throws:
java.sql.SQLException
-
getLastCheckoutFailure
public java.lang.Throwable getLastCheckoutFailure(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getLastCheckoutFailurein interfacePooledDataSource- Throws:
java.sql.SQLException
-
getLastIdleTestFailure
public java.lang.Throwable getLastIdleTestFailure(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getLastIdleTestFailurein interfacePooledDataSource- Throws:
java.sql.SQLException
-
getLastConnectionTestFailure
public java.lang.Throwable getLastConnectionTestFailure(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getLastConnectionTestFailurein interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumThreadsAwaitingCheckout
public int getNumThreadsAwaitingCheckout(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getNumThreadsAwaitingCheckoutin interfacePooledDataSource- Throws:
java.sql.SQLException
-
sampleLastAcquisitionFailureStackTraceDefaultUser
public java.lang.String sampleLastAcquisitionFailureStackTraceDefaultUser() throws java.sql.SQLException- Specified by:
sampleLastAcquisitionFailureStackTraceDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
sampleLastCheckinFailureStackTraceDefaultUser
public java.lang.String sampleLastCheckinFailureStackTraceDefaultUser() throws java.sql.SQLException- Specified by:
sampleLastCheckinFailureStackTraceDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
sampleLastCheckoutFailureStackTraceDefaultUser
public java.lang.String sampleLastCheckoutFailureStackTraceDefaultUser() throws java.sql.SQLException- Specified by:
sampleLastCheckoutFailureStackTraceDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
sampleLastIdleTestFailureStackTraceDefaultUser
public java.lang.String sampleLastIdleTestFailureStackTraceDefaultUser() throws java.sql.SQLException- Specified by:
sampleLastIdleTestFailureStackTraceDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
sampleLastConnectionTestFailureStackTraceDefaultUser
public java.lang.String sampleLastConnectionTestFailureStackTraceDefaultUser() throws java.sql.SQLException- Specified by:
sampleLastConnectionTestFailureStackTraceDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
sampleLastAcquisitionFailureStackTrace
public java.lang.String sampleLastAcquisitionFailureStackTrace(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
sampleLastAcquisitionFailureStackTracein interfacePooledDataSource- Throws:
java.sql.SQLException
-
sampleLastCheckinFailureStackTrace
public java.lang.String sampleLastCheckinFailureStackTrace(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
sampleLastCheckinFailureStackTracein interfacePooledDataSource- Throws:
java.sql.SQLException
-
sampleLastCheckoutFailureStackTrace
public java.lang.String sampleLastCheckoutFailureStackTrace(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
sampleLastCheckoutFailureStackTracein interfacePooledDataSource- Throws:
java.sql.SQLException
-
sampleLastIdleTestFailureStackTrace
public java.lang.String sampleLastIdleTestFailureStackTrace(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
sampleLastIdleTestFailureStackTracein interfacePooledDataSource- Throws:
java.sql.SQLException
-
sampleLastConnectionTestFailureStackTrace
public java.lang.String sampleLastConnectionTestFailureStackTrace(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
sampleLastConnectionTestFailureStackTracein interfacePooledDataSource- Throws:
java.sql.SQLException
-
softResetDefaultUser
public void softResetDefaultUser() throws java.sql.SQLExceptionDescription copied from interface:PooledDataSourceDiscards all Connections managed by the PooledDataSource's default-authentication pool and reacquires new Connections to populate. Current checked out Connections will still be valid, and should still be checked into the PooledDataSource (so the PooledDataSource can destroy them).- Specified by:
softResetDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumConnections
public int getNumConnections(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getNumConnectionsin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumIdleConnections
public int getNumIdleConnections(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getNumIdleConnectionsin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumBusyConnections
public int getNumBusyConnections(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getNumBusyConnectionsin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumUnclosedOrphanedConnections
public int getNumUnclosedOrphanedConnections(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getNumUnclosedOrphanedConnectionsin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementCacheNumStatements
public int getStatementCacheNumStatements(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getStatementCacheNumStatementsin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementCacheNumCheckedOut
public int getStatementCacheNumCheckedOut(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getStatementCacheNumCheckedOutin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementCacheNumConnectionsWithCachedStatements
public int getStatementCacheNumConnectionsWithCachedStatements(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getStatementCacheNumConnectionsWithCachedStatementsin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getEffectivePropertyCycle
public float getEffectivePropertyCycle(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getEffectivePropertyCyclein interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStartTimeMillis
public long getStartTimeMillis(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getUpTimeMillis
public long getUpTimeMillis(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getNumFailedCheckins
public long getNumFailedCheckins(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getNumFailedCheckouts
public long getNumFailedCheckouts(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getNumFailedIdleTests
public long getNumFailedIdleTests(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
softReset
public void softReset(java.lang.String username, java.lang.String password) throws java.sql.SQLExceptionDescription copied from interface:PooledDataSourceDiscards all Connections managed by the PooledDataSource with the specified authentication credentials and reacquires new Connections to populate. Current checked out Connections will still be valid, and should still be checked into the PooledDataSource (so the PooledDataSource can destroy them).- Specified by:
softResetin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumBusyConnectionsAllUsers
public int getNumBusyConnectionsAllUsers() throws java.sql.SQLException- Specified by:
getNumBusyConnectionsAllUsersin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumIdleConnectionsAllUsers
public int getNumIdleConnectionsAllUsers() throws java.sql.SQLException- Specified by:
getNumIdleConnectionsAllUsersin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumConnectionsAllUsers
public int getNumConnectionsAllUsers() throws java.sql.SQLException- Specified by:
getNumConnectionsAllUsersin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumUnclosedOrphanedConnectionsAllUsers
public int getNumUnclosedOrphanedConnectionsAllUsers() throws java.sql.SQLException- Specified by:
getNumUnclosedOrphanedConnectionsAllUsersin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementCacheNumStatementsAllUsers
public int getStatementCacheNumStatementsAllUsers() throws java.sql.SQLException- Specified by:
getStatementCacheNumStatementsAllUsersin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementCacheNumCheckedOutStatementsAllUsers
public int getStatementCacheNumCheckedOutStatementsAllUsers() throws java.sql.SQLException- Specified by:
getStatementCacheNumCheckedOutStatementsAllUsersin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementCacheNumConnectionsWithCachedStatementsAllUsers
public int getStatementCacheNumConnectionsWithCachedStatementsAllUsers() throws java.sql.SQLException- Specified by:
getStatementCacheNumConnectionsWithCachedStatementsAllUsersin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementDestroyerNumConnectionsInUseAllUsers
public int getStatementDestroyerNumConnectionsInUseAllUsers() throws java.sql.SQLException- Specified by:
getStatementDestroyerNumConnectionsInUseAllUsersin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementDestroyerNumConnectionsWithDeferredDestroyStatementsAllUsers
public int getStatementDestroyerNumConnectionsWithDeferredDestroyStatementsAllUsers() throws java.sql.SQLException- Specified by:
getStatementDestroyerNumConnectionsWithDeferredDestroyStatementsAllUsersin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementDestroyerNumDeferredDestroyStatementsAllUsers
public int getStatementDestroyerNumDeferredDestroyStatementsAllUsers() throws java.sql.SQLException- Specified by:
getStatementDestroyerNumDeferredDestroyStatementsAllUsersin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementDestroyerNumConnectionsInUseDefaultUser
public int getStatementDestroyerNumConnectionsInUseDefaultUser() throws java.sql.SQLException- Specified by:
getStatementDestroyerNumConnectionsInUseDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementDestroyerNumConnectionsWithDeferredDestroyStatementsDefaultUser
public int getStatementDestroyerNumConnectionsWithDeferredDestroyStatementsDefaultUser() throws java.sql.SQLException- Specified by:
getStatementDestroyerNumConnectionsWithDeferredDestroyStatementsDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementDestroyerNumDeferredDestroyStatementsDefaultUser
public int getStatementDestroyerNumDeferredDestroyStatementsDefaultUser() throws java.sql.SQLException- Specified by:
getStatementDestroyerNumDeferredDestroyStatementsDefaultUserin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementDestroyerNumThreads
public int getStatementDestroyerNumThreads() throws java.sql.SQLException- Specified by:
getStatementDestroyerNumThreadsin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementDestroyerNumActiveThreads
public int getStatementDestroyerNumActiveThreads() throws java.sql.SQLException- Specified by:
getStatementDestroyerNumActiveThreadsin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementDestroyerNumIdleThreads
public int getStatementDestroyerNumIdleThreads() throws java.sql.SQLException- Specified by:
getStatementDestroyerNumIdleThreadsin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementDestroyerNumTasksPending
public int getStatementDestroyerNumTasksPending() throws java.sql.SQLException- Specified by:
getStatementDestroyerNumTasksPendingin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementDestroyerNumConnectionsInUse
public int getStatementDestroyerNumConnectionsInUse(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getStatementDestroyerNumConnectionsInUsein interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementDestroyerNumConnectionsWithDeferredDestroyStatements
public int getStatementDestroyerNumConnectionsWithDeferredDestroyStatements(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getStatementDestroyerNumConnectionsWithDeferredDestroyStatementsin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getStatementDestroyerNumDeferredDestroyStatements
public int getStatementDestroyerNumDeferredDestroyStatements(java.lang.String username, java.lang.String password) throws java.sql.SQLException- Specified by:
getStatementDestroyerNumDeferredDestroyStatementsin interfacePooledDataSource- Throws:
java.sql.SQLException
-
sampleStatementDestroyerStackTraces
public java.lang.String sampleStatementDestroyerStackTraces() throws java.sql.SQLException- Specified by:
sampleStatementDestroyerStackTracesin interfacePooledDataSource- Throws:
java.sql.SQLException
-
sampleStatementDestroyerStatus
public java.lang.String sampleStatementDestroyerStatus() throws java.sql.SQLException- Specified by:
sampleStatementDestroyerStatusin interfacePooledDataSource- Throws:
java.sql.SQLException
-
softResetAllUsers
public void softResetAllUsers() throws java.sql.SQLExceptionDescription copied from interface:PooledDataSourceDiscards all Connections managed by the PooledDataSource and reacquires new Connections to populate. Current checked out Connections will still be valid, and should still be checked into the PooledDataSource (so the PooledDataSource can destroy them).- Specified by:
softResetAllUsersin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getNumUserPools
public int getNumUserPools() throws java.sql.SQLException- Specified by:
getNumUserPoolsin interfacePooledDataSource- Throws:
java.sql.SQLException
-
getAllUsers
public java.util.Collection getAllUsers() throws java.sql.SQLException- Specified by:
getAllUsersin interfacePooledDataSource- Throws:
java.sql.SQLException
-
hardReset
public void hardReset()
Description copied from interface:PooledDataSourceDestroys all pooled and checked-out Connections associated with this DataSource immediately. The PooledDataSource is reset to its initial state prior to first Connection acquisition, with no pools yet active, but ready for requests.- Specified by:
hardResetin interfacePooledDataSource
-
close
public void close()
Description copied from interface:PooledDataSourceC3P0 pooled DataSources use no resources before they are actually used in a VM, and they close themselves in their finalize() method. When they are active and pooling, they may have open database connections and their pool may spawn several threads for its maintenance. You can use this method to clean these resource methods up quickly when you will no longer be using this DataSource. The resources will actually be cleaned up only if no other DataSources are sharing the same pool.
You can equivalently use the static method destroy() in the DataSources class to clean-up these resources.
This is equivalent to calling close( false ).
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacePooledDataSource- See Also:
DataSources.destroy(javax.sql.DataSource)
-
close
public void close(boolean force_destroy)
Deprecated.the force_destroy argument is now meaningless, as pools are no longer potentially shared between multiple DataSources.Description copied from interface:PooledDataSourceShould be used only with great caution. If
force_destroyis set to true, this immediately destroys any pool and cleans up all resources this DataSource may be using, even if other DataSources are sharing that pool! In general, it is difficult to know whether a pool is being shared by multiple DataSources. It may depend upon whether or not a JNDI implementation returns a single instance or multiple copies upon lookup (which is undefined by the JNDI spec).In general, this method should be used only when you wish to wind down all c3p0 pools in a ClassLoader. For example, when shutting down and restarting a web application that uses c3p0, you may wish to kill all threads making use of classes loaded by a web-app specific ClassLoader, so that the ClassLoader can be cleanly garbage collected. In this case, you may wish to use force destroy. Otherwise, it is much safer to use the simple destroy() method, which will not shut down pools that may still be in use.
To close a pool normally, use the no argument close method, or set
force_destroyto false.- Specified by:
closein interfacePooledDataSource- See Also:
PooledDataSource.close()
-
resetPoolManager
public void resetPoolManager()
-
resetPoolManager
public void resetPoolManager(boolean close_checked_out_connections)
-
toString
public abstract java.lang.String toString(boolean show_config)
-
isWrapperForThis
protected final boolean isWrapperForThis(java.lang.Class<?> iface)
-
isWrapperFor
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException- Specified by:
isWrapperForin interfacejava.sql.Wrapper- Throws:
java.sql.SQLException
-
unwrap
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException- Specified by:
unwrapin interfacejava.sql.Wrapper- Throws:
java.sql.SQLException
-
-