Class SessionTimeouts
- java.lang.Object
- 
- org.keycloak.models.sessions.infinispan.util.SessionTimeouts
 
- 
 public class SessionTimeouts extends Object - Author:
- Marek Posolda
 
- 
- 
Field SummaryFields Modifier and Type Field Description static longENTRY_EXPIRED_FLAGThis indicates that entry is already expired and should be removed from the cachestatic intMINIMAL_EXPIRATION_SECThis is used just if timeouts are not set on the realm (usually happens just during tests when realm is created manually with the model API)
 - 
Constructor SummaryConstructors Constructor Description SessionTimeouts()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static longgetClientSessionLifespanMs(RealmModel realm, AuthenticatedClientSessionEntity clientSessionEntity)Get the maximum lifespan, which this clientSession can remain in the infinispan cache.static longgetClientSessionMaxIdleMs(RealmModel realm, AuthenticatedClientSessionEntity clientSessionEntity)Get the maxIdle, which this clientSession will use.static longgetLoginFailuresLifespanMs(RealmModel realm, LoginFailureEntity loginFailureEntity)Not using lifespan for detached login failure (backwards compatibility with the background cleaner threads, which were used for cleanup of detached login failures)static longgetLoginFailuresMaxIdleMs(RealmModel realm, LoginFailureEntity loginFailureEntity)Not using maxIdle for detached login failure (backwards compatibility with the background cleaner threads, which were used for cleanup of detached login failures)static longgetOfflineClientSessionLifespanMs(RealmModel realm, AuthenticatedClientSessionEntity authenticatedClientSessionEntity)Get the maximum lifespan, which this offline clientSession can remain in the infinispan cache.static longgetOfflineClientSessionMaxIdleMs(RealmModel realm, AuthenticatedClientSessionEntity authenticatedClientSessionEntity)Get the maxIdle, which this offline clientSession will use.static longgetOfflineSessionLifespanMs(RealmModel realm, UserSessionEntity userSessionEntity)Get the maximum lifespan, which this offline userSession can remain in the infinispan cache.static longgetOfflineSessionMaxIdleMs(RealmModel realm, UserSessionEntity userSessionEntity)Get the maximum idle time for this offline userSession.static longgetUserSessionLifespanMs(RealmModel realm, UserSessionEntity userSessionEntity)Get the maximum lifespan, which this userSession can remain in the infinispan cache.static longgetUserSessionMaxIdleMs(RealmModel realm, UserSessionEntity userSessionEntity)Get the maximum idle time for this userSession.
 
- 
- 
- 
Field Detail- 
ENTRY_EXPIRED_FLAGpublic static final long ENTRY_EXPIRED_FLAG This indicates that entry is already expired and should be removed from the cache- See Also:
- Constant Field Values
 
 - 
MINIMAL_EXPIRATION_SECpublic static final int MINIMAL_EXPIRATION_SEC This is used just if timeouts are not set on the realm (usually happens just during tests when realm is created manually with the model API)- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getUserSessionLifespanMspublic static long getUserSessionLifespanMs(RealmModel realm, UserSessionEntity userSessionEntity) Get the maximum lifespan, which this userSession can remain in the infinispan cache. Returned value will be used as "lifespan" when calling put/replace operation in the infinispan cache for this entity- Parameters:
- realm-
- userSessionEntity-
- Returns:
 
 - 
getUserSessionMaxIdleMspublic static long getUserSessionMaxIdleMs(RealmModel realm, UserSessionEntity userSessionEntity) Get the maximum idle time for this userSession. Returned value will be used when as "maxIdleTime" when calling put/replace operation in the infinispan cache for this entity- Parameters:
- realm-
- userSessionEntity-
- Returns:
 
 - 
getClientSessionLifespanMspublic static long getClientSessionLifespanMs(RealmModel realm, AuthenticatedClientSessionEntity clientSessionEntity) Get the maximum lifespan, which this clientSession can remain in the infinispan cache. Returned value will be used as "lifespan" when calling put/replace operation in the infinispan cache for this entity- Parameters:
- realm-
- clientSessionEntity-
- Returns:
 
 - 
getClientSessionMaxIdleMspublic static long getClientSessionMaxIdleMs(RealmModel realm, AuthenticatedClientSessionEntity clientSessionEntity) Get the maxIdle, which this clientSession will use. Returned value will be used as "maxIdle" when calling put/replace operation in the infinispan cache for this entity- Parameters:
- realm-
- clientSessionEntity-
- Returns:
 
 - 
getOfflineSessionLifespanMspublic static long getOfflineSessionLifespanMs(RealmModel realm, UserSessionEntity userSessionEntity) Get the maximum lifespan, which this offline userSession can remain in the infinispan cache. Returned value will be used as "lifespan" when calling put/replace operation in the infinispan cache for this entity- Parameters:
- realm-
- userSessionEntity-
- Returns:
 
 - 
getOfflineSessionMaxIdleMspublic static long getOfflineSessionMaxIdleMs(RealmModel realm, UserSessionEntity userSessionEntity) Get the maximum idle time for this offline userSession. Returned value will be used when as "maxIdleTime" when calling put/replace operation in the infinispan cache for this entity- Parameters:
- realm-
- userSessionEntity-
- Returns:
 
 - 
getOfflineClientSessionLifespanMspublic static long getOfflineClientSessionLifespanMs(RealmModel realm, AuthenticatedClientSessionEntity authenticatedClientSessionEntity) Get the maximum lifespan, which this offline clientSession can remain in the infinispan cache. Returned value will be used as "lifespan" when calling put/replace operation in the infinispan cache for this entity- Parameters:
- realm-
- authenticatedClientSessionEntity-
- Returns:
 
 - 
getOfflineClientSessionMaxIdleMspublic static long getOfflineClientSessionMaxIdleMs(RealmModel realm, AuthenticatedClientSessionEntity authenticatedClientSessionEntity) Get the maxIdle, which this offline clientSession will use. Returned value will be used as "maxIdle" when calling put/replace operation in the infinispan cache for this entity- Parameters:
- realm-
- authenticatedClientSessionEntity-
- Returns:
 
 - 
getLoginFailuresLifespanMspublic static long getLoginFailuresLifespanMs(RealmModel realm, LoginFailureEntity loginFailureEntity) Not using lifespan for detached login failure (backwards compatibility with the background cleaner threads, which were used for cleanup of detached login failures)- Parameters:
- realm-
- loginFailureEntity-
- Returns:
 
 - 
getLoginFailuresMaxIdleMspublic static long getLoginFailuresMaxIdleMs(RealmModel realm, LoginFailureEntity loginFailureEntity) Not using maxIdle for detached login failure (backwards compatibility with the background cleaner threads, which were used for cleanup of detached login failures)- Parameters:
- realm-
- loginFailureEntity-
- Returns:
 
 
- 
 
-