@Override protected LockStatus onBeforeLoadFromMemcached( final String sessionId ) throws InterruptedException, ExecutionException { final Request request = _currentRequest.get(); if ( request == null ) { throw new RuntimeException( "There's no request set, this indicates that this findSession" + "was triggered by the container which should already be handled in findSession." ); } /* let's see if we should lock the session for this request */ if ( _uriPattern.matcher( RequestTrackingHostValve.getURIWithQueryString( request ) ).matches() ) { if ( _log.isDebugEnabled() ) { _log.debug( "Lock request for request " + RequestTrackingHostValve.getURIWithQueryString( request ) ); } return lock( sessionId ); } if ( _log.isDebugEnabled() ) { _log.debug( "Not lock request for request " + RequestTrackingHostValve.getURIWithQueryString( request ) ); } _stats.nonStickySessionsReadOnlyRequest(); return LockStatus.LOCK_NOT_REQUIRED; }
@Override protected LockStatus onBeforeLoadFromMemcached( final String sessionId ) throws InterruptedException, ExecutionException { final Request request = _currentRequest.get(); if ( request == null ) { throw new RuntimeException( "There's no request set, this indicates that this findSession" + "was triggered by the container which should already be handled in findSession." ); } /* lets see if we can skip the locking as we consider this beeing a readonly request */ if ( _readOnlyRequestCache.isReadOnlyRequest( RequestTrackingHostValve.getURIWithQueryString( request ) ) ) { if ( _log.isDebugEnabled() ) { _log.debug( "Not getting lock for readonly request " + RequestTrackingHostValve.getURIWithQueryString( request ) ); } _stats.nonStickySessionsReadOnlyRequest(); return LockStatus.LOCK_NOT_REQUIRED; } return lock( sessionId ); }
@Override protected LockStatus onBeforeLoadFromMemcached( final String sessionId ) throws InterruptedException, ExecutionException { final Request request = _currentRequest.get(); if ( request == null ) { throw new RuntimeException( "There's no request set, this indicates that this findSession" + "was triggered by the container which should already be handled in findSession." ); } /* let's see if we should lock the session for this request */ if ( _uriPattern.matcher( RequestTrackingHostValve.getURIWithQueryString( request ) ).matches() ) { if ( _log.isDebugEnabled() ) { _log.debug( "Lock request for request " + RequestTrackingHostValve.getURIWithQueryString( request ) ); } return lock( sessionId ); } if ( _log.isDebugEnabled() ) { _log.debug( "Not lock request for request " + RequestTrackingHostValve.getURIWithQueryString( request ) ); } _stats.nonStickySessionsReadOnlyRequest(); return LockStatus.LOCK_NOT_REQUIRED; }
@Override protected LockStatus onBeforeLoadFromMemcached( final String sessionId ) throws InterruptedException, ExecutionException { final Request request = _currentRequest.get(); if ( request == null ) { throw new RuntimeException( "There's no request set, this indicates that this findSession" + "was triggered by the container which should already be handled in findSession." ); } /* lets see if we can skip the locking as we consider this beeing a readonly request */ if ( _readOnlyRequestCache.isReadOnlyRequest( RequestTrackingHostValve.getURIWithQueryString( request ) ) ) { if ( _log.isDebugEnabled() ) { _log.debug( "Not getting lock for readonly request " + RequestTrackingHostValve.getURIWithQueryString( request ) ); } _stats.nonStickySessionsReadOnlyRequest(); return LockStatus.LOCK_NOT_REQUIRED; } return lock( sessionId ); }