code: public String getAvailableNodeId( final String nodeId ) {
  
          String result = null;
  
          /*
           * first check regular nodes
           */
          result = getRandomNextNodeId( nodeId, _nodeIds );
  
          /*
           * we got no node from the first nodes list, so we must check the
           * alternative node list
           */
          if ( result == null && _failoverNodeIds != null && !_failoverNodeIds.isEmpty() ) {
              result = getRandomNextNodeId( nodeId, _failoverNodeIds );
          }
  
          return result;
      }
docs: Get an available (randomly selected) memcached node id for session backup.
  The active node ids are preferred, if no active node id is left to try,
  a failover node id is picked.
  If no failover node id is left, this method returns just null.
  
  @param nodeId the unavailable nodeId which is used to start checking other nodes.
  @return a nodeId if any available node was found, otherwise <code>null</code>.