org.keycloak.models.utils

## Class SessionTimeoutHelper

- java.lang.Object
- - org.keycloak.models.utils.SessionTimeoutHelper

-     public class SessionTimeoutHelper
      extends Object

  Author:
    Marek Posolda

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `IDLE_TIMEOUT_WINDOW_SECONDS` The maximum time difference, which will be still tolerated when checking userSession idle timeout.
    `static int` | `PERIODIC_CLEANER_IDLE_TIMEOUT_WINDOW_SECONDS` The maximum time difference, which will be still tolerated when checking userSession idle timeout with periodic cleaner threads.
    `static int` | `PERIODIC_TASK_INTERVAL_SECONDS` Interval specifies maximum time, for which the "userSession.lastSessionRefresh" may contain stale value.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SessionTimeoutHelper()`

  - ### Method Summary

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PERIODIC_TASK_INTERVAL_SECONDS

          public static final int PERIODIC_TASK_INTERVAL_SECONDS

      Interval specifies maximum time, for which the "userSession.lastSessionRefresh" may contain stale value. For example, if there are 2 datacenters and sessionRefresh will happen on DC1, then the message about the updated lastSessionRefresh may be sent to the DC2 later (EG. Some periodic thread will send the updated lastSessionRefresh times in batches with 60 seconds delay).
      See Also:
        Constant Field Values

    - #### IDLE_TIMEOUT_WINDOW_SECONDS

          public static final int IDLE_TIMEOUT_WINDOW_SECONDS

      The maximum time difference, which will be still tolerated when checking userSession idle timeout. For example, if there are 2 datacenters and sessionRefresh happened on DC1, then we still want to tolerate some timeout on DC2 due the fact that lastSessionRefresh of current userSession may be updated later from DC1. See `PERIODIC_TASK_INTERVAL_SECONDS`
      See Also:
        Constant Field Values

    - #### PERIODIC_CLEANER_IDLE_TIMEOUT_WINDOW_SECONDS

          public static final int PERIODIC_CLEANER_IDLE_TIMEOUT_WINDOW_SECONDS

      The maximum time difference, which will be still tolerated when checking userSession idle timeout with periodic cleaner threads. Just the sessions, with the timeout bigger than this value are considered really time-outed and can be garbage-collected (Considering the cross-dc environment and the fact that some session updates on different DC can be postponed and seen on current DC with some delay). See `PERIODIC_TASK_INTERVAL_SECONDS` and `IDLE_TIMEOUT_WINDOW_SECONDS`
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SessionTimeoutHelper

          public SessionTimeoutHelper()

Copyright © 2020 JBoss by Red Hat. All rights reserved.