class RoundRobinLoadBalance implements LoadBalance {
    static Logger logger = LoggerFactory.getLogger(RoundRobinLoadBalance.class);
    // cache the idx for each service so that the index is per service for the round robin.
    Map<String, AtomicInteger> serviceIdx = new ConcurrentHashMap<>();

    public RoundRobinLoadBalance() {
        if(logger.isInfoEnabled()) logger.info("A RoundRobinLoadBalance instance is started");
    }

    /**
     * Round robin requestKey is not used as it should be null, the url will
     * be selected from the list base on an instance idx so every url has the
     * same priority.
     *
     * @param urls List
     * @param serviceId String
     * @param tag String
     * @param requestKey String
     * @return Url
     */
    @Override
    public URL select(List<URL> urls, String serviceId, String tag, String requestKey) {<FILL_FUNCTION_BODY>}

    protected URL doSelect(List<URL> urls, String key) {
        int index = getNextPositive(key);
        for (int i = 0; i < urls.size(); i++) {
            URL url = urls.get((i + index) % urls.size());
            if (url != null) {
                return url;
            }
        }
        return null;
    }

    // get positive int
    private int getNextPositive(String key) {
        AtomicInteger idx = serviceIdx.get(key);
        if(idx == null) {
            idx = new AtomicInteger((int)(Math.random()*10));
            serviceIdx.put(key, idx);
        }
        return getPositive(idx.incrementAndGet());
    }
}

        URL url = null;
        if (urls.size() > 1) {
            String key = tag == null ? serviceId : serviceId + "|" + tag;
            url = doSelect(urls, key);
        } else if (urls.size() == 1) {
            url = urls.get(0);
        }
        return url;
    
<no_super_class>