the underlying shared resource which the pool manages.
Because the pool hands back a shared resource, it
may be useful to manage interrupts such that they are isolated from independent
service acquisition requests. Thus, setting this value to false
will ensure that
an outstanding dispatch to the underlying resource from the pool is uninterruptible
but individual service acquisition requests are.
the StatsReceiver that is used to report pool specific stats.
Reserve the use of the returned Service instance.
Reserve the use of the returned Service instance.
To relinquish the use of the reserved Service, the user must call Service.close().
will be ClientConnection.nil when called on the client-side.
Reserve the use of the returned Service instance using ClientConnection.nil.
Reserve the use of the returned Service instance using ClientConnection.nil.
To relinquish the use of the reserved Service, the user must call Service.close().
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
SingletonPool closes asynchronously; the underlying connection is closed once all references are returned.
Apply f
on created services, returning the resulting Future in their
stead.
Apply f
on created services, returning the resulting Future in their
stead. This is useful for implementing common factory wrappers that
only need to modify or operate on the underlying service.
Return true
if and only if status is currently Status.Open.
Return true
if and only if status is currently Status.Open.
Map created services.
Map created services. Useful for implementing common styles of factory wrappers.
The current availability Status of this ServiceFactory
The current availability Status of this ServiceFactory
The status of a SingletonPool is the worse of the the underlying status and the status of the currently cached service, if any.
Make a service that after dispatching a request on that service, releases the service.
Make a service that after dispatching a request on that service, releases the service.
A pool that maintains at most one service from the underlying ServiceFactory -- concurrent leases share the same, cached service. A new Service is established whenever the service factory fails or the current service has become unavailable.