Package io.grpc.xds

Class WeightedRoundRobinLoadBalancer.StaticStrideScheduler

    • Constructor Summary

      Constructors 
      Constructor Description
      StaticStrideScheduler​(float[] weights, java.util.concurrent.atomic.AtomicInteger sequence)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private long nextSequence()
      Returns the next sequence number and atomically increases sequence with wraparound.
      (package private) int pick()  
      (package private) boolean usesRoundRobin()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • scaledWeights

        private final short[] scaledWeights
      • sequence

        private final java.util.concurrent.atomic.AtomicInteger sequence
      • usesRoundRobin

        private final boolean usesRoundRobin
    • Constructor Detail

      • StaticStrideScheduler

        StaticStrideScheduler​(float[] weights,
                              java.util.concurrent.atomic.AtomicInteger sequence)
    • Method Detail

      • usesRoundRobin

        boolean usesRoundRobin()
      • nextSequence

        private long nextSequence()
        Returns the next sequence number and atomically increases sequence with wraparound.
      • pick

        int pick()