int next(int epoch) {
            if (brokers.isEmpty()) return -1;
            if (this.epoch != epoch) {
                this.epoch = epoch;
                this.index = 0;
                this.offset = (offset + 1) % brokers.size();
            }
            if (index >= brokers.size()) return -1;
            int broker = brokers.get((index + offset) % brokers.size());
            index++;
            return broker;
        }
Get the next broker in this list, or -1 if there are no more elements to be
returned.

@param epoch     The current iteration epoch.

@return          The broker ID, or -1 if there are no more brokers to be
                 returned in this epoch.
metadata/src/main/java/org/apache/kafka/metadata/placement/StripedReplicaPlacer.java