Package io.servicetalk.client.api
Interface LoadBalancerReadyEvent
public interface LoadBalancerReadyEvent
A hint from
LoadBalancer.eventStream()
that the internal state of the LoadBalancer
is ready such
LoadBalancer.selectConnection(Predicate, ContextMap)
is not likely to fail. Note that the return status of
LoadBalancer.selectConnection(Predicate, ContextMap)
may depend upon many factors including but not limited
to:
- Instantaneous demand vs the amount of resources (e.g. connections) on hand
- If the
LoadBalancer
favors queuing requests or "fail fast" behavior - The dynamic nature of host availability may result in no hosts being available
isReady()
returning true
doesn't necessarily mean
LoadBalancer.selectConnection(Predicate, ContextMap)
will always return successfully.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LoadBalancerReadyEvent
static final LoadBalancerReadyEvent
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isReady()
A hint which can be used to determine if theLoadBalancer
is "ready".
-
Field Details
-
LOAD_BALANCER_READY_EVENT
-
LOAD_BALANCER_NOT_READY_EVENT
-
-
Method Details
-
isReady
boolean isReady()A hint which can be used to determine if theLoadBalancer
is "ready".- Returns:
true
if there were no hosts available and now there are hosts available.false
if there were hosts available and now there are no hosts available.
-