Package org.apache.tomcat.jdbc.pool
Class ConnectionPool.ConnectionFuture
- java.lang.Object
- 
- org.apache.tomcat.jdbc.pool.ConnectionPool.ConnectionFuture
 
- 
- All Implemented Interfaces:
- java.lang.Runnable,- java.util.concurrent.Future<java.sql.Connection>
 - Enclosing class:
- ConnectionPool
 
 protected class ConnectionPool.ConnectionFuture extends java.lang.Object implements java.util.concurrent.Future<java.sql.Connection>, java.lang.RunnableThread safe wrapper around a future for the regular queue This one retrieves the pooled connection object and performs the initialization according to interceptors and validation rules. This class is thread safe and is cancellable
- 
- 
Constructor SummaryConstructors Constructor Description ConnectionFuture(java.util.concurrent.Future<PooledConnection> pcf)ConnectionFuture(PooledConnection pc)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel(boolean mayInterruptIfRunning)java.sql.Connectionget()java.sql.Connectionget(long timeout, java.util.concurrent.TimeUnit unit)booleanisCancelled()booleanisDone()voidrun()run method to be executed when cancelled by an executor
 
- 
- 
- 
Constructor Detail- 
ConnectionFuturepublic ConnectionFuture(java.util.concurrent.Future<PooledConnection> pcf) 
 - 
ConnectionFuturepublic ConnectionFuture(PooledConnection pc) throws java.sql.SQLException - Throws:
- java.sql.SQLException
 
 
- 
 - 
Method Detail- 
cancelpublic boolean cancel(boolean mayInterruptIfRunning) - Specified by:
- cancelin interface- java.util.concurrent.Future<java.sql.Connection>
 
 - 
getpublic java.sql.Connection get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException- Specified by:
- getin interface- java.util.concurrent.Future<java.sql.Connection>
- Throws:
- java.lang.InterruptedException
- java.util.concurrent.ExecutionException
 
 - 
getpublic java.sql.Connection get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException- Specified by:
- getin interface- java.util.concurrent.Future<java.sql.Connection>
- Throws:
- java.lang.InterruptedException
- java.util.concurrent.ExecutionException
- java.util.concurrent.TimeoutException
 
 - 
isCancelledpublic boolean isCancelled() - Specified by:
- isCancelledin interface- java.util.concurrent.Future<java.sql.Connection>
 
 - 
isDonepublic boolean isDone() - Specified by:
- isDonein interface- java.util.concurrent.Future<java.sql.Connection>
 
 - 
runpublic void run() run method to be executed when cancelled by an executor- Specified by:
- runin interface- java.lang.Runnable
 
 
- 
 
-