protected class ConnectionPool.ConnectionFuture
extends java.lang.Object
implements java.util.concurrent.Future<java.sql.Connection>, java.lang.Runnable
Constructor and Description |
---|
ConnectionPool.ConnectionFuture(java.util.concurrent.Future<PooledConnection> pcf) |
ConnectionPool.ConnectionFuture(PooledConnection pc) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
java.sql.Connection |
get() |
java.sql.Connection |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
run()
run method to be executed when cancelled by an executor
|
public ConnectionPool.ConnectionFuture(java.util.concurrent.Future<PooledConnection> pcf)
public ConnectionPool.ConnectionFuture(PooledConnection pc) throws java.sql.SQLException
java.sql.SQLException
public boolean cancel(boolean mayInterruptIfRunning)
cancel
in interface java.util.concurrent.Future<java.sql.Connection>
public java.sql.Connection get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
get
in interface java.util.concurrent.Future<java.sql.Connection>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public java.sql.Connection get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
get
in interface java.util.concurrent.Future<java.sql.Connection>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
public boolean isCancelled()
isCancelled
in interface java.util.concurrent.Future<java.sql.Connection>
public boolean isDone()
isDone
in interface java.util.concurrent.Future<java.sql.Connection>
public void run()
run
in interface java.lang.Runnable
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.