public interface LeaseRequest
extends org.apache.hc.core5.concurrent.Cancellable
ConnectionEndpoint whose life cycle
is managed by a connection manager.| Modifier and Type | Method and Description |
|---|---|
ConnectionEndpoint |
get(long timeout,
TimeUnit tunit)
Returns
ConnectionEndpoint within a given time. |
ConnectionEndpoint get(long timeout, TimeUnit tunit) throws InterruptedException, ExecutionException, 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 Cancellable.cancel() is called while this is blocking or
before this began, an InterruptedException will
be thrown.timeout - the timeout, 0 or negative for no timeouttunit - the unit for the timeout,
may be null only if there is no timeoutTimeoutException - in case of a timeoutInterruptedException - if the calling thread is interrupted while waitingExecutionExceptionCopyright © 1999–2018 The Apache Software Foundation. All rights reserved.