com.mchange.v2.c3p0.stmt
Class GooGooStatementCache

java.lang.Object
  extended by com.mchange.v2.c3p0.stmt.GooGooStatementCache
Direct Known Subclasses:
DoubleMaxStatementCache, GlobalMaxOnlyStatementCache, PerConnectionMaxOnlyStatementCache

public abstract class GooGooStatementCache
extends java.lang.Object


Nested Class Summary
protected static class GooGooStatementCache.ConnectionStatementManager
           
protected  class GooGooStatementCache.Deathmarch
           
protected  class GooGooStatementCache.DeathmarchConnectionStatementManager
           
protected static class GooGooStatementCache.SimpleConnectionStatementManager
           
 
Constructor Summary
GooGooStatementCache(com.mchange.v2.async.AsynchronousRunner blockingTaskAsyncRunner, com.mchange.v2.async.AsynchronousRunner deferredStatementDestroyer)
           
 
Method Summary
 void checkinAll(java.sql.Connection pcon)
           
 void checkinStatement(java.lang.Object pstmt)
           
 java.lang.Object checkoutStatement(java.sql.Connection physicalConnection, java.lang.reflect.Method stmtProducingMethod, java.lang.Object[] args)
           
 void close()
           
 void closeAll(java.sql.Connection pcon)
           
 java.lang.String dumpStatementCacheStatus()
           
 int getNumConnectionsWithCachedStatements()
           
 int getNumStatements()
           
 int getNumStatementsCheckedOut()
           
 int getStatementDestroyerNumConnectionsInUse()
           
 int getStatementDestroyerNumConnectionsWithDeferredDestroyStatements()
           
 int getStatementDestroyerNumDeferredDestroyStatements()
           
 java.lang.Boolean inUse(java.sql.Connection physicalConnection)
           
 boolean isClosed()
           
 boolean tryMarkConnectionInUse(java.sql.Connection physicalConnection)
           
 void unmarkConnectionInUse(java.sql.Connection physicalConnection)
           
 void waitMarkConnectionInUse(java.sql.Connection physicalConnection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GooGooStatementCache

public GooGooStatementCache(com.mchange.v2.async.AsynchronousRunner blockingTaskAsyncRunner,
                            com.mchange.v2.async.AsynchronousRunner deferredStatementDestroyer)
Method Detail

getNumStatements

public int getNumStatements()

getNumStatementsCheckedOut

public int getNumStatementsCheckedOut()

getNumConnectionsWithCachedStatements

public int getNumConnectionsWithCachedStatements()

dumpStatementCacheStatus

public java.lang.String dumpStatementCacheStatus()

waitMarkConnectionInUse

public void waitMarkConnectionInUse(java.sql.Connection physicalConnection)
                             throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

tryMarkConnectionInUse

public boolean tryMarkConnectionInUse(java.sql.Connection physicalConnection)

unmarkConnectionInUse

public void unmarkConnectionInUse(java.sql.Connection physicalConnection)

inUse

public java.lang.Boolean inUse(java.sql.Connection physicalConnection)

getStatementDestroyerNumConnectionsInUse

public int getStatementDestroyerNumConnectionsInUse()

getStatementDestroyerNumConnectionsWithDeferredDestroyStatements

public int getStatementDestroyerNumConnectionsWithDeferredDestroyStatements()

getStatementDestroyerNumDeferredDestroyStatements

public int getStatementDestroyerNumDeferredDestroyStatements()

checkoutStatement

public java.lang.Object checkoutStatement(java.sql.Connection physicalConnection,
                                          java.lang.reflect.Method stmtProducingMethod,
                                          java.lang.Object[] args)
                                   throws java.sql.SQLException,
                                          com.mchange.v2.util.ResourceClosedException
Throws:
java.sql.SQLException
com.mchange.v2.util.ResourceClosedException

checkinStatement

public void checkinStatement(java.lang.Object pstmt)
                      throws java.sql.SQLException
Throws:
java.sql.SQLException

checkinAll

public void checkinAll(java.sql.Connection pcon)
                throws java.sql.SQLException
Throws:
java.sql.SQLException

closeAll

public void closeAll(java.sql.Connection pcon)
              throws java.sql.SQLException
Throws:
java.sql.SQLException

close

public void close()
           throws java.sql.SQLException
Throws:
java.sql.SQLException

isClosed

public boolean isClosed()