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
LoadBalancerfavors 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 LoadBalancerReadyEventstatic final LoadBalancerReadyEvent -
Method Summary
Modifier and TypeMethodDescriptionbooleanisReady()A hint which can be used to determine if theLoadBalanceris "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 theLoadBalanceris "ready".- Returns:
trueif there were no hosts available and now there are hosts available.falseif there were hosts available and now there are no hosts available.
-