private boolean pingSession( @Nonnull final String sessionId ) throws InterruptedException { final Future<Boolean> touchResult = _storage.add( _storageKeyFormat.format(sessionId), 1, BYTE_1 ); try { if ( touchResult.get() ) { _stats.nonStickySessionsPingFailed(); _log.warn( "The session " + sessionId + " should be touched in memcached, but it does not exist therein." ); return false; } _log.debug( "The session was ping'ed successfully." ); return true; } catch ( final ExecutionException e ) { _log.warn( "An exception occurred when trying to ping session " + sessionId, e ); return false; } }
private void pingSession( @Nonnull final MemcachedBackupSession session, @Nonnull final BackupSessionService backupSessionService ) throws InterruptedException { final Future<Boolean> touchResult = _storage.add( _storageKeyFormat.format(session.getIdInternal()), 5, BYTE_1 ); try { if ( touchResult.get() ) { _stats.nonStickySessionsPingFailed(); _log.warn( "The session " + session.getIdInternal() + " should be touched in memcached, but it does not exist" + " therein. Will store in memcached again." ); updateSession( session, backupSessionService ); } else _log.debug( "The session was ping'ed successfully." ); } catch ( final ExecutionException e ) { _log.warn( "An exception occurred when trying to ping session " + session.getIdInternal(), e ); } }
private boolean pingSession( @Nonnull final String sessionId ) throws InterruptedException { final Future<Boolean> touchResult = _storage.add( _storageKeyFormat.format(sessionId), 1, BYTE_1 ); try { if ( touchResult.get() ) { _stats.nonStickySessionsPingFailed(); _log.warn( "The session " + sessionId + " should be touched in memcached, but it does not exist therein." ); return false; } _log.debug( "The session was ping'ed successfully." ); return true; } catch ( final ExecutionException e ) { _log.warn( "An exception occurred when trying to ping session " + sessionId, e ); return false; } }
private void pingSession( @Nonnull final MemcachedBackupSession session, @Nonnull final BackupSessionService backupSessionService ) throws InterruptedException { final Future<Boolean> touchResult = _storage.add( _storageKeyFormat.format(session.getIdInternal()), 5, BYTE_1 ); try { if ( touchResult.get() ) { _stats.nonStickySessionsPingFailed(); _log.warn( "The session " + session.getIdInternal() + " should be touched in memcached, but it does not exist" + " therein. Will store in memcached again." ); updateSession( session, backupSessionService ); } else _log.debug( "The session was ping'ed successfully." ); } catch ( final ExecutionException e ) { _log.warn( "An exception occurred when trying to ping session " + session.getIdInternal(), e ); } }