public boolean canHitMemcached ( final String sessionId ) { if ( isEncodeNodeIdInSessionId ( ) ) { final String nodeId = _sessionIdFormat . extractMemcachedId ( sessionId ) ; if ( nodeId == null ) { LOG . debug ( "The sessionId does not contain a nodeId so that the memcached node could not be identified." ) ; return false ; } if ( ! _nodeIdService . isNodeAvailable ( nodeId ) ) { LOG . debug ( "The node " + nodeId + " is not available, therefore " + sessionId + " cannot be loaded from this memcached." ) ; return false ; } } return true ; }
Can be used to determine if the given sessionId can be used to interact with memcached . This also checks if the related memcached is available .