Package io.servicetalk.client.api
Interface LoadBalancerReadyEvent
-
public interface LoadBalancerReadyEventA hint fromLoadBalancer.eventStream()that the internal state of theLoadBalanceris ready suchLoadBalancer.selectConnection(Predicate)is not likely to fail. Note that the return status ofLoadBalancer.selectConnection(Predicate)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()returningtruedoesn't necessarily meanLoadBalancer.selectConnection(Predicate)will always return successfully.
-
-
Field Summary
Fields Modifier and Type Field Description static LoadBalancerReadyEventLOAD_BALANCER_NOT_READY_EVENTstatic LoadBalancerReadyEventLOAD_BALANCER_READY_EVENT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisReady()A hint which can be used to determine if theLoadBalanceris "ready".
-
-
-
Field Detail
-
LOAD_BALANCER_READY_EVENT
static final LoadBalancerReadyEvent LOAD_BALANCER_READY_EVENT
-
LOAD_BALANCER_NOT_READY_EVENT
static final LoadBalancerReadyEvent LOAD_BALANCER_NOT_READY_EVENT
-
-
Method Detail
-
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.
-
-