A simple round robin distributor.
A simple round robin distributor.
An activity representing the active set of ServiceFactories.
An activity representing the active set of ServiceFactories.
Reserve the use of a given service instance.
Reserve the use of a given service instance. This pins the underlying channel and the returned service has exclusive use of its underlying connection. To relinquish the use of the reserved Service, the user must call Service.close().
The throwable to use when the load balancer is empty.
The throwable to use when the load balancer is empty.
Create a node whose sole purpose it is to endlessly fail with the given cause.
Create a node whose sole purpose it is to endlessly fail with the given cause.
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.
Create an initial distributor.
Create an initial distributor.
Invoke fn
on the current distributor.
Invoke fn
on the current distributor. This is done through the updater
and is serialized with distributor updates and other invocations.
Map created services.
Map created services. Useful for implementing common styles of factory wrappers.
The maximum number of balancing tries (yielding unavailable factories) until we give up.
The maximum number of balancing tries (yielding unavailable factories) until we give up.
Create a new node representing the given factory, with the given weight.
Create a new node representing the given factory, with the given weight. Report node-related stats to the given StatsReceiver.
Balancer reports stats here.
Balancer reports stats here.
Balancer status is the best of its constituent nodes.
Balancer status is the best of its constituent nodes.
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.
Update the load balancer's service list.
Update the load balancer's service list. After the update, which may run asynchronously, is completed, the load balancer balances across these factories and no others.
A simple round robin balancer that chooses the next backend in the list for each request.