code: protected String getRandomNextNodeId( final String nodeId, final Collection<String> nodeIds ) {
  
          /* create a list of nodeIds to check randomly
           */
          final List<String> otherNodeIds = new ArrayList<String>( nodeIds );
          otherNodeIds.remove( nodeId );
  
          while ( !otherNodeIds.isEmpty() ) {
              final String nodeIdToCheck = otherNodeIds.get( _random.nextInt( otherNodeIds.size() ) );
              if ( isNodeAvailable( nodeIdToCheck ) ) {
                  return nodeIdToCheck;
              }
              otherNodeIds.remove( nodeIdToCheck );
          }
  
          return null;
      }
docs: Determines (randomly) an available node id from the provided node ids. The
  returned node id will be different from the provided nodeId and will
  be available according to the local {@link NodeAvailabilityCache}.
  
  @param nodeId
  the original id
  @param nodeIds
  the node ids to choose from
  @return an available node or null