21 package com.griddynamics.jagger.invoker;
23 import com.google.common.collect.AbstractIterator;
24 import com.griddynamics.jagger.util.Pair;
26 import java.util.Iterator;
38 public class SimpleCircularLoadBalancer<Q, E>
extends PairSupplierFactoryLoadBalancer<Q, E> {
48 return new AbstractIterator<Pair<Q,E>> () {
50 private PairSupplier<Q, E> pairs = getPairSupplier();
51 private int size = pairs.size();
52 private int index = 0;
55 protected Pair<Q, E> computeNext() {
59 return pairs.get(index++);
63 public String toString() {
64 return "SimpleCircularLoadBalancer iterator";