class RoundRobinLoadBalance<T> extends AbstractLoadBalance<T> {
    private final AtomicInteger idx = new AtomicInteger(0);

    @Override
    protected Referer<T> doSelect(Request request) {<FILL_FUNCTION_BODY>}

    @Override
    protected void doSelectToHolder(Request request, List<Referer<T>> refersHolder) {
        addToSelectHolderFromStart(getReferers(), refersHolder, getNextNonNegative());
    }

    // get non-negative int
    private int getNextNonNegative() {
        return MathUtil.getNonNegative(idx.incrementAndGet());
    }

    @Override
    public boolean canSelectMulti() {
        return false; //Obtaining multiple referers may cause uneven requests
    }
}

        List<Referer<T>> referers = getReferers();
        Referer<T> ref = referers.get(getNextNonNegative() % referers.size());
        if (ref.isAvailable()) {
            return ref;
        }
        return selectFromRandomStart(referers);
    
<methods>public non-sealed void <init>() ,public void init(com.weibo.api.motan.rpc.URL) ,public void onRefresh(List<Referer<T>>) ,public Referer<T> select(com.weibo.api.motan.rpc.Request) ,public void selectToHolder(com.weibo.api.motan.rpc.Request, List<Referer<T>>) ,public void setWeightString(java.lang.String) <variables>public static final int MAX_REFERER_COUNT,protected com.weibo.api.motan.rpc.URL clusterUrl,private List<Referer<T>> referers