Package org.apache.tomcat.jdbc.pool
Class ConnectionPool.ConnectionFuture
java.lang.Object
org.apache.tomcat.jdbc.pool.ConnectionPool.ConnectionFuture
- All Implemented Interfaces:
Runnable
,Future<Connection>
- Enclosing class:
ConnectionPool
protected class ConnectionPool.ConnectionFuture
extends Object
implements Future<Connection>, Runnable
Thread 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
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Constructor Summary
ConstructorDescription -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Constructor Details
-
ConnectionFuture
-
ConnectionFuture
- Throws:
SQLException
-
-
Method Details
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) - Specified by:
cancel
in interfaceFuture<Connection>
-
get
- Specified by:
get
in interfaceFuture<Connection>
- Throws:
InterruptedException
ExecutionException
-
get
public Connection get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
get
in interfaceFuture<Connection>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceFuture<Connection>
-
isDone
public boolean isDone()- Specified by:
isDone
in interfaceFuture<Connection>
-
run
-