@Override
    public ServiceInstance vote(List<ServiceInstance> instances) {
        if (instances.isEmpty()) {
          return null;
        }
        int i = index.getAndIncrement();
        int pos = i % instances.size();
        ServiceInstance instance = instances.get(pos);
        return instance;
    }
@ Override public ServiceInstance vote ( List < ServiceInstance > instances ) { if ( instances . isEmpty ( ) ) { return null ; } int i = index . getAndIncrement ( ) ; int pos = i % instances . size ( ) ; ServiceInstance instance = instances . get ( pos ) ; return instance ; }
Vote a ServiceInstance based on the RoundRobin LoadBalancer algorithm.

@return
the voted ServiceInstance.