21 package com.griddynamics.jagger.invoker;
23 import com.griddynamics.jagger.util.Pair;
25 import com.google.common.collect.AbstractIterator;
27 import java.util.Iterator;
39 public class SimpleCircularLoadBalancer<Q, E>
extends PairSupplierFactoryLoadBalancer<Q, E> {
42 super(pairSupplierFactory);
53 return new AbstractIterator<Pair<Q,E>> () {
55 private PairSupplier<Q, E> pairs = getPairSupplier();
56 private int size = pairs.size();
57 private int index = 0;
60 protected Pair<Q, E> computeNext() {
64 return pairs.get(index++);
68 public String toString() {
69 return "SimpleCircularLoadBalancer iterator";