public interface LeaseRequest
ConnectionEndpoint whose life cycle
is managed by a connection manager.| Modifier and Type | Method and Description |
|---|---|
ConnectionEndpoint |
get(Timeout timeout)
Returns
ConnectionEndpoint within a given time. |
ConnectionEndpoint get(Timeout timeout) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
ConnectionEndpoint within a given time.
This method will block until a connection becomes available,
the timeout expires, or the connection manager is shut down.
Timeouts are handled with millisecond precision.
If #cancel() is called while this is blocking or
before this began, an InterruptedException will
be thrown.timeout - the operation timeout.java.util.concurrent.TimeoutException - in case of a timeoutjava.lang.InterruptedException - if the calling thread is interrupted while waitingjava.util.concurrent.ExecutionException