Package io.grpc.xds
Class WeightedRoundRobinLoadBalancer.WeightedChildLbState
- java.lang.Object
-
- io.grpc.util.MultiChildLoadBalancer.ChildLbState
-
- io.grpc.xds.WeightedRoundRobinLoadBalancer.WeightedChildLbState
-
- Enclosing class:
- WeightedRoundRobinLoadBalancer
final class WeightedRoundRobinLoadBalancer.WeightedChildLbState extends io.grpc.util.MultiChildLoadBalancer.ChildLbState
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
WeightedRoundRobinLoadBalancer.WeightedChildLbState.OrcaReportListener
(package private) class
WeightedRoundRobinLoadBalancer.WeightedChildLbState.WrrChildLbStateHelper
-
Field Summary
Fields Modifier and Type Field Description private long
lastUpdated
private long
nonEmptySince
private WeightedRoundRobinLoadBalancer.WeightedChildLbState.OrcaReportListener
orcaReportListener
private java.util.Set<WeightedRoundRobinLoadBalancer.WrrSubchannel>
subchannels
private double
weight
-
Constructor Summary
Constructors Constructor Description WeightedChildLbState(java.lang.Object key, io.grpc.LoadBalancerProvider policyProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSubchannel(WeightedRoundRobinLoadBalancer.WrrSubchannel wrrSubchannel)
protected io.grpc.util.MultiChildLoadBalancer.ChildLbState.ChildLbStateHelper
createChildHelper()
WeightedRoundRobinLoadBalancer.WeightedChildLbState.OrcaReportListener
getOrCreateOrcaListener(float errorUtilizationPenalty)
private double
getWeight(java.util.concurrent.atomic.AtomicInteger staleEndpoints, java.util.concurrent.atomic.AtomicInteger notYetUsableEndpoints)
void
removeSubchannel(WeightedRoundRobinLoadBalancer.WrrSubchannel wrrSubchannel)
-
-
-
Field Detail
-
subchannels
private final java.util.Set<WeightedRoundRobinLoadBalancer.WrrSubchannel> subchannels
-
lastUpdated
private volatile long lastUpdated
-
nonEmptySince
private volatile long nonEmptySince
-
weight
private volatile double weight
-
orcaReportListener
private WeightedRoundRobinLoadBalancer.WeightedChildLbState.OrcaReportListener orcaReportListener
-
-
Method Detail
-
createChildHelper
protected io.grpc.util.MultiChildLoadBalancer.ChildLbState.ChildLbStateHelper createChildHelper()
- Overrides:
createChildHelper
in classio.grpc.util.MultiChildLoadBalancer.ChildLbState
-
getWeight
private double getWeight(java.util.concurrent.atomic.AtomicInteger staleEndpoints, java.util.concurrent.atomic.AtomicInteger notYetUsableEndpoints)
-
addSubchannel
public void addSubchannel(WeightedRoundRobinLoadBalancer.WrrSubchannel wrrSubchannel)
-
getOrCreateOrcaListener
public WeightedRoundRobinLoadBalancer.WeightedChildLbState.OrcaReportListener getOrCreateOrcaListener(float errorUtilizationPenalty)
-
removeSubchannel
public void removeSubchannel(WeightedRoundRobinLoadBalancer.WrrSubchannel wrrSubchannel)
-
-