T- the route type that represents the opposite endpoint of a pooled connection.
C- the type of pooled connections.
public interface ConnPool<T,C extends GracefullyCloseable>
ConnPoolrepresents a shared pool connections can be leased from and released back to.
|Modifier and Type||Method and Description|
Attempts to lease a connection for the given route and with the given state from the pool.
Releases the pool entry back to the pool.
Future<PoolEntry<T,C>> lease(T route, Object state, Timeout requestTimeout, FutureCallback<PoolEntry<T,C>> callback)
route- route of the connection.
state- arbitrary object that represents a particular state (usually a security principal or a unique token identifying the user whose credentials have been used while establishing the connection). May be
requestTimeout- request timeout.
callback- operation completion callback.
Copyright © 2005–2018 The Apache Software Foundation. All rights reserved.