Package io.grpc.xds
Class WeightedRoundRobinLoadBalancer.WeightedRoundRobinPicker
- java.lang.Object
-
- io.grpc.LoadBalancer.SubchannelPicker
-
- io.grpc.xds.WeightedRoundRobinLoadBalancer.WeightedRoundRobinPicker
-
- Enclosing class:
- WeightedRoundRobinLoadBalancer
static final class WeightedRoundRobinLoadBalancer.WeightedRoundRobinPicker extends io.grpc.LoadBalancer.SubchannelPicker
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<io.grpc.util.MultiChildLoadBalancer.ChildLbState>
children
private boolean
enableOobLoadReport
private float
errorUtilizationPenalty
private int
hashCode
private java.util.List<io.grpc.LoadBalancer.SubchannelPicker>
pickers
private java.util.List<OrcaPerRequestUtil.OrcaPerRequestReportListener>
reportListeners
private WeightedRoundRobinLoadBalancer.StaticStrideScheduler
scheduler
private java.util.concurrent.atomic.AtomicInteger
sequence
-
Constructor Summary
Constructors Constructor Description WeightedRoundRobinPicker(java.util.List<io.grpc.util.MultiChildLoadBalancer.ChildLbState> children, boolean enableOobLoadReport, float errorUtilizationPenalty, java.util.concurrent.atomic.AtomicInteger sequence)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
(package private) java.util.List<io.grpc.util.MultiChildLoadBalancer.ChildLbState>
getChildren()
int
hashCode()
io.grpc.LoadBalancer.PickResult
pickSubchannel(io.grpc.LoadBalancer.PickSubchannelArgs args)
java.lang.String
toString()
private boolean
updateWeight(float[] newWeights)
Returnstrue
if weights are different than round_robin.
-
-
-
Field Detail
-
children
private final java.util.List<io.grpc.util.MultiChildLoadBalancer.ChildLbState> children
-
pickers
private final java.util.List<io.grpc.LoadBalancer.SubchannelPicker> pickers
-
reportListeners
private final java.util.List<OrcaPerRequestUtil.OrcaPerRequestReportListener> reportListeners
-
enableOobLoadReport
private final boolean enableOobLoadReport
-
errorUtilizationPenalty
private final float errorUtilizationPenalty
-
sequence
private final java.util.concurrent.atomic.AtomicInteger sequence
-
hashCode
private final int hashCode
-
scheduler
private volatile WeightedRoundRobinLoadBalancer.StaticStrideScheduler scheduler
-
-
Method Detail
-
pickSubchannel
public io.grpc.LoadBalancer.PickResult pickSubchannel(io.grpc.LoadBalancer.PickSubchannelArgs args)
- Specified by:
pickSubchannel
in classio.grpc.LoadBalancer.SubchannelPicker
-
updateWeight
private boolean updateWeight(float[] newWeights)
Returnstrue
if weights are different than round_robin.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getChildren
java.util.List<io.grpc.util.MultiChildLoadBalancer.ChildLbState> getChildren()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
-