Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

...