test_class.declarator: redisSession
test_class.modifier: private
test_class.original_string: private RedisSessionRepository redisSession;
test_class.type: RedisSessionRepository
test_class.var_name: redisSession
test_class.declarator: redis
test_class.modifier: private
test_class.original_string: private RedisFacade redis;
test_class.type: RedisFacade
test_class.var_name: redis
test_class.declarator: session
test_class.modifier: private
test_class.original_string: private SessionData session;
test_class.type: SessionData
test_class.var_name: session
test_class.declarator: expiration
test_class.modifier: private
test_class.original_string: private NotificationExpirationManagement expiration;
test_class.type: NotificationExpirationManagement
test_class.var_name: expiration
test_class.file: session-replacement/src/test/java/com/amadeus/session/repository/redis/TestNotificationExpirationManagement.java
test_class.identifier: TestNotificationExpirationManagement
test_case.body: @Test
    public void testSessionTouched() {
      expiration.sessionTouched(session);
      ArgumentCaptor<byte[]> captureExpireKey = ArgumentCaptor.forClass(byte[].class);
      ArgumentCaptor<byte[]> captureSessionKey = ArgumentCaptor.forClass(byte[].class);
      verify(redis).sadd(captureExpireKey.capture(), captureSessionKey.capture());
      assertEquals("prefixexpirations:60000", SafeEncoder.encode(captureExpireKey.getValue()));
      assertEquals("key:{1}", SafeEncoder.encode(captureSessionKey.getValue()));
      ArgumentCaptor<Long> captureInstant = ArgumentCaptor.forClass(Long.class);
      verify(redis).expireAt(captureExpireKey.capture(), captureInstant.capture());
      assertEquals("prefixexpirations:60000", SafeEncoder.encode(captureExpireKey.getValue()));
      assertEquals(Long.valueOf(360), captureInstant.getValue());
      ArgumentCaptor<byte[]> captureValue = ArgumentCaptor.forClass(byte[].class);
      ArgumentCaptor<Integer> captureInt = ArgumentCaptor.forClass(Integer.class);
      verify(redis).setex(captureExpireKey.capture(), captureInt.capture(), captureValue.capture());
      assertEquals("com.amadeus.session:expire::test:{1}", SafeEncoder.encode(captureExpireKey.getValue()));
      assertEquals("", SafeEncoder.encode(captureValue.getValue()));
      assertEquals(Integer.valueOf(20), captureInt.getValue());
      verify(redis).expire(captureSessionKey.capture(), captureInt.capture());
      assertEquals("key:{1}", SafeEncoder.encode(captureSessionKey.getValue()));
      assertEquals(Integer.valueOf(320), captureInt.getValue());
    }
test_case.class_method_signature: TestNotificationExpirationManagement.testSessionTouched()
test_case.full_signature: @Test public void testSessionTouched()
test_case.identifier: testSessionTouched
test_case.invocations: sessionTouched forClass forClass sadd verify capture capture assertEquals encode getValue assertEquals encode getValue forClass expireAt verify capture capture assertEquals encode getValue assertEquals valueOf getValue forClass forClass setex verify capture capture capture assertEquals encode getValue assertEquals encode getValue assertEquals valueOf getValue expire verify capture capture assertEquals encode getValue assertEquals valueOf getValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSessionTouched()
focal_class.declarator: logger = LoggerFactory.getLogger(NotificationExpirationManagement.class)
focal_class.modifier: static
focal_class.original_string: static Logger logger = LoggerFactory.getLogger(NotificationExpirationManagement.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: ONE_MINUTE = TimeUnit.MINUTES.toSeconds(1)
focal_class.modifier: private static final
focal_class.original_string: private static final long ONE_MINUTE = TimeUnit.MINUTES.toSeconds(1);
focal_class.type: long
focal_class.var_name: ONE_MINUTE
focal_class.declarator: SPOP_BULK_SIZE = 1000
focal_class.modifier: private static final
focal_class.original_string: private static final int SPOP_BULK_SIZE = 1000;
focal_class.type: int
focal_class.var_name: SPOP_BULK_SIZE
focal_class.declarator: SESSION_PERSISTENCE_SAFETY_MARGIN = 300
focal_class.modifier: static final
focal_class.original_string: static final int SESSION_PERSISTENCE_SAFETY_MARGIN = 300;
focal_class.type: int
focal_class.var_name: SESSION_PERSISTENCE_SAFETY_MARGIN
focal_class.declarator: EMPTY_STRING = encode("")
focal_class.modifier: private static final
focal_class.original_string: private static final byte[] EMPTY_STRING = encode("");
focal_class.type: byte[]
focal_class.var_name: EMPTY_STRING
focal_class.declarator: DEFAULT_SESSION_EXPIRE_PREFIX = "com.amadeus.session:expire:"
focal_class.modifier: static final
focal_class.original_string: static final String DEFAULT_SESSION_EXPIRE_PREFIX = "com.amadeus.session:expire:";
focal_class.type: String
focal_class.var_name: DEFAULT_SESSION_EXPIRE_PREFIX
focal_class.declarator: DEFAULT_SESSION_EXPIRE_PREFIX_BUF = encode(DEFAULT_SESSION_EXPIRE_PREFIX)
focal_class.modifier: static final
focal_class.original_string: static final byte[] DEFAULT_SESSION_EXPIRE_PREFIX_BUF = encode(DEFAULT_SESSION_EXPIRE_PREFIX);
focal_class.type: byte[]
focal_class.var_name: DEFAULT_SESSION_EXPIRE_PREFIX_BUF
focal_class.declarator: RESET_RETRY_THRESHOLD = SECONDS.toMillis(377)
focal_class.modifier: private static final
focal_class.original_string: private static final long RESET_RETRY_THRESHOLD = SECONDS.toMillis(377);
focal_class.type: long
focal_class.var_name: RESET_RETRY_THRESHOLD
focal_class.declarator: FIBONACCI_DELAY_PATTERN = new int[] { 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233 }
focal_class.modifier: private static final
focal_class.original_string: private static final int[] FIBONACCI_DELAY_PATTERN = new int[] { 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233 };
focal_class.type: int[]
focal_class.var_name: FIBONACCI_DELAY_PATTERN
focal_class.declarator: MAX_CONNECTION_ERRORS = FIBONACCI_DELAY_PATTERN.length
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_CONNECTION_ERRORS = FIBONACCI_DELAY_PATTERN.length;
focal_class.type: int
focal_class.var_name: MAX_CONNECTION_ERRORS
focal_class.declarator: redis
focal_class.modifier: private final
focal_class.original_string: private final RedisFacade redis;
focal_class.type: RedisFacade
focal_class.var_name: redis
focal_class.declarator: repository
focal_class.modifier: private final
focal_class.original_string: private final RedisSessionRepository repository;
focal_class.type: RedisSessionRepository
focal_class.var_name: repository
focal_class.declarator: keyExpirePrefix
focal_class.modifier: private final
focal_class.original_string: private final String keyExpirePrefix;
focal_class.type: String
focal_class.var_name: keyExpirePrefix
focal_class.declarator: expirationsPrefix
focal_class.modifier: private final
focal_class.original_string: private final String expirationsPrefix;
focal_class.type: String
focal_class.var_name: expirationsPrefix
focal_class.declarator: forcedExpirationsPrefix
focal_class.modifier: private final
focal_class.original_string: private final String forcedExpirationsPrefix;
focal_class.type: String
focal_class.var_name: forcedExpirationsPrefix
focal_class.declarator: namespace
focal_class.modifier: private final
focal_class.original_string: private final String namespace;
focal_class.type: String
focal_class.var_name: namespace
focal_class.declarator: owner
focal_class.modifier: private final
focal_class.original_string: private final String owner;
focal_class.type: String
focal_class.var_name: owner
focal_class.declarator: sticky
focal_class.modifier: private final
focal_class.original_string: private final boolean sticky;
focal_class.type: boolean
focal_class.var_name: sticky
focal_class.declarator: expirationListener
focal_class.modifier: private
focal_class.original_string: private ExpirationListener expirationListener;
focal_class.type: ExpirationListener
focal_class.var_name: expirationListener
focal_class.declarator: cleanupFuture
focal_class.modifier: private
focal_class.original_string: private ScheduledFuture<?> cleanupFuture;
focal_class.type: ScheduledFuture<?>
focal_class.var_name: cleanupFuture
focal_class.declarator: forceCleanupFuture
focal_class.modifier: private
focal_class.original_string: private ScheduledFuture<?> forceCleanupFuture;
focal_class.type: ScheduledFuture<?>
focal_class.var_name: forceCleanupFuture
focal_class.file: session-replacement/src/main/java/com/amadeus/session/repository/redis/NotificationExpirationManagement.java
focal_class.identifier: NotificationExpirationManagement
focal_class.interfaces: implements RedisExpirationStrategy
focal_class.class_method_signature: NotificationExpirationManagement.NotificationExpirationManagement(RedisFacade redis, RedisSessionRepository redisSession, String namespace,
        String owner, String keyPrefix, boolean sticky)
focal_class.full_signature:   NotificationExpirationManagement(RedisFacade redis, RedisSessionRepository redisSession, String namespace,
        String owner, String keyPrefix, boolean sticky)
focal_class.identifier: NotificationExpirationManagement
focal_class.parameters: (RedisFacade redis, RedisSessionRepository redisSession, String namespace,
        String owner, String keyPrefix, boolean sticky)
focal_class.signature:  NotificationExpirationManagement(RedisFacade redis, RedisSessionRepository redisSession, String namespace,
        String owner, String keyPrefix, boolean sticky)
focal_class.class_method_signature: NotificationExpirationManagement.constructKeyExpirePrefix(String sessionOwner)
focal_class.full_signature: private String constructKeyExpirePrefix(String sessionOwner)
focal_class.identifier: constructKeyExpirePrefix
focal_class.modifiers: private
focal_class.parameters: (String sessionOwner)
focal_class.return: String
focal_class.signature: String constructKeyExpirePrefix(String sessionOwner)
focal_class.class_method_signature: NotificationExpirationManagement.sessionDeleted(SessionData session)
focal_class.full_signature: @Override public void sessionDeleted(SessionData session)
focal_class.identifier: sessionDeleted
focal_class.modifiers: @Override public
focal_class.parameters: (SessionData session)
focal_class.return: void
focal_class.signature: void sessionDeleted(SessionData session)
focal_class.class_method_signature: NotificationExpirationManagement.sessionTouched(SessionData session)
focal_class.full_signature: @Override public void sessionTouched(SessionData session)
focal_class.identifier: sessionTouched
focal_class.modifiers: @Override public
focal_class.parameters: (SessionData session)
focal_class.return: void
focal_class.signature: void sessionTouched(SessionData session)
focal_class.class_method_signature: NotificationExpirationManagement.roundUpToNextMinute(long timeInMs)
focal_class.full_signature: private static long roundUpToNextMinute(long timeInMs)
focal_class.identifier: roundUpToNextMinute
focal_class.modifiers: private static
focal_class.parameters: (long timeInMs)
focal_class.return: long
focal_class.signature: long roundUpToNextMinute(long timeInMs)
focal_class.class_method_signature: NotificationExpirationManagement.roundDownMinute(long timeInMs)
focal_class.full_signature: static long roundDownMinute(long timeInMs)
focal_class.identifier: roundDownMinute
focal_class.modifiers: static
focal_class.parameters: (long timeInMs)
focal_class.return: long
focal_class.signature: long roundDownMinute(long timeInMs)
focal_class.class_method_signature: NotificationExpirationManagement.startExpiredSessionsTask(final SessionManager sessionManager)
focal_class.full_signature: @Override public void startExpiredSessionsTask(final SessionManager sessionManager)
focal_class.identifier: startExpiredSessionsTask
focal_class.modifiers: @Override public
focal_class.parameters: (final SessionManager sessionManager)
focal_class.return: void
focal_class.signature: void startExpiredSessionsTask(final SessionManager sessionManager)
focal_class.class_method_signature: NotificationExpirationManagement.getKeysToExpire(byte[] key)
focal_class.full_signature:  Set<byte[]> getKeysToExpire(byte[] key)
focal_class.identifier: getKeysToExpire
focal_class.parameters: (byte[] key)
focal_class.return: Set<byte[]>
focal_class.signature: Set<byte[]> getKeysToExpire(byte[] key)
focal_class.class_method_signature: NotificationExpirationManagement.smembersAndDel(final byte[] key)
focal_class.full_signature: static TransactionRunner<Set<byte[]>> smembersAndDel(final byte[] key)
focal_class.identifier: smembersAndDel
focal_class.modifiers: static
focal_class.parameters: (final byte[] key)
focal_class.return: TransactionRunner<Set<byte[]>>
focal_class.signature: TransactionRunner<Set<byte[]>> smembersAndDel(final byte[] key)
focal_class.class_method_signature: NotificationExpirationManagement.getSessionExpireKey(String id)
focal_class.full_signature:  byte[] getSessionExpireKey(String id)
focal_class.identifier: getSessionExpireKey
focal_class.parameters: (String id)
focal_class.return: byte[]
focal_class.signature: byte[] getSessionExpireKey(String id)
focal_class.class_method_signature: NotificationExpirationManagement.getSessionExpireKey(String owner, String id)
focal_class.full_signature:  byte[] getSessionExpireKey(String owner, String id)
focal_class.identifier: getSessionExpireKey
focal_class.parameters: (String owner, String id)
focal_class.return: byte[]
focal_class.signature: byte[] getSessionExpireKey(String owner, String id)
focal_class.class_method_signature: NotificationExpirationManagement.getExpirationsKey(long instant)
focal_class.full_signature: private byte[] getExpirationsKey(long instant)
focal_class.identifier: getExpirationsKey
focal_class.modifiers: private
focal_class.parameters: (long instant)
focal_class.return: byte[]
focal_class.signature: byte[] getExpirationsKey(long instant)
focal_class.class_method_signature: NotificationExpirationManagement.getForcedExpirationsKey(long instant)
focal_class.full_signature: private byte[] getForcedExpirationsKey(long instant)
focal_class.identifier: getForcedExpirationsKey
focal_class.modifiers: private
focal_class.parameters: (long instant)
focal_class.return: byte[]
focal_class.signature: byte[] getForcedExpirationsKey(long instant)
focal_class.class_method_signature: NotificationExpirationManagement.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: NotificationExpirationManagement.reset()
focal_class.full_signature: public void reset()
focal_class.identifier: reset
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void reset()
focal_class.class_method_signature: NotificationExpirationManagement.sessionIdChange(SessionData session)
focal_class.full_signature: @Override public void sessionIdChange(SessionData session)
focal_class.identifier: sessionIdChange
focal_class.modifiers: @Override public
focal_class.parameters: (SessionData session)
focal_class.return: void
focal_class.signature: void sessionIdChange(SessionData session)
focal_method.body: @Override
    public void sessionTouched(SessionData session) {
      new ExpirationManagement().manageExpiration(session);
    }
focal_method.class_method_signature: NotificationExpirationManagement.sessionTouched(SessionData session)
focal_method.full_signature: @Override public void sessionTouched(SessionData session)
focal_method.identifier: sessionTouched
focal_method.invocations: manageExpiration
focal_method.modifiers: @Override public
focal_method.parameters: (SessionData session)
focal_method.return: void
focal_method.signature: void sessionTouched(SessionData session)