private int incrementAndGetModulo(int modulo) {
        for (;;) {
            int current = nextServerCyclicCounter.get();
            int next = (current + 1) % modulo;
            if (nextServerCyclicCounter.compareAndSet(current, next))
                return next;
        }
    }
Inspired by the implementation of {@link AtomicInteger#incrementAndGet()}.

@param modulo The modulo to bound the value of the counter.
@return The next value.
ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/RoundRobinRule.java