throws NoNodesAvailableException
{
if (availableNodes.size() < 1) {
// We don't have any live nodes to assign to.
// Let the caller figure it out.
throw new NoNodesAvailableException("no live nodes available");
}
return availableNodes.get(
nextNode.getAndIncrement() % availableNodes.size());
}