code: private int incrementAndGetModulo(int modulo) {
          for (;;) {
              int current = nextIndex.get();
              int next = (current + 1) % modulo;
              if (nextIndex.compareAndSet(current, next) && current < modulo)
                  return current;
          }
      }
docs: Referenced from RoundRobinRule
  Inspired by the implementation of {@link AtomicInteger#incrementAndGet()}.
  
  @param modulo The modulo to bound the value of the counter.
  @return The next value.