THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
public synchronized int nextNodeIdx(int nodeSize) {
return (this.nextNodeIdx++) % nodeSize;
}
The LeastLoadedNodeProvider will provide the nodeSize to prevent the out of bound excpetion.
When the LeastLoadedNodeProvider iterates the node list, it can consult the ClusterConnectionStates for the index of the node it should provide.
...