Package io.servicetalk.client.api
Interface LoadBalancerReadyEvent
-
public interface LoadBalancerReadyEvent
A hint fromLoadBalancer.eventStream()
that the internal state of theLoadBalancer
is 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
LoadBalancer
favors queuing requests or "fail fast" behavior - The dynamic nature of host availability may result in no hosts being available
isReady()
returningtrue
doesn't necessarily meanLoadBalancer.selectConnection(Predicate)
will always return successfully.
-
-
Field Summary
Fields Modifier and Type Field Description static LoadBalancerReadyEvent
LOAD_BALANCER_NOT_READY_EVENT
static LoadBalancerReadyEvent
LOAD_BALANCER_READY_EVENT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isReady()
A hint which can be used to determine if theLoadBalancer
is "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 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.
-
-