Class UserSessionTransaction
java.lang.Object
org.keycloak.models.AbstractKeycloakTransaction
org.keycloak.models.sessions.infinispan.remote.transaction.UserSessionTransaction
- All Implemented Interfaces:
KeycloakTransaction
A
KeycloakTransaction
implementation that wraps all the user and client session transactions.
This implementation commits all modifications asynchronously and concurrently in both user and client sessions transactions. Waits for all them to complete. This is an optimization to reduce the response time.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.keycloak.models.AbstractKeycloakTransaction
AbstractKeycloakTransaction.TransactionState
-
Field Summary
Fields inherited from class org.keycloak.models.AbstractKeycloakTransaction
state
-
Constructor Summary
ConstructorDescriptionUserSessionTransaction
(UserSessionChangeLogTransaction userSessions, UserSessionChangeLogTransaction offlineUserSessions, ClientSessionChangeLogTransaction clientSessions, ClientSessionChangeLogTransaction offlineClientSessions) -
Method Summary
Modifier and TypeMethodDescriptionvoid
begin()
protected void
getClientSessions
(boolean offline) getUserSessions
(boolean offline) void
removeAllSessionByUserId
(String realmId, String userId) void
removeAllSessionsByRealmId
(String realmId) void
removeOnlineSessionsByRealmId
(String realmId) void
removeUserSessionById
(String userSessionId, boolean offline) protected void
Methods inherited from class org.keycloak.models.AbstractKeycloakTransaction
beginImpl, commit, getRollbackOnly, getState, isActive, rollback, setRollbackOnly
-
Constructor Details
-
UserSessionTransaction
public UserSessionTransaction(UserSessionChangeLogTransaction userSessions, UserSessionChangeLogTransaction offlineUserSessions, ClientSessionChangeLogTransaction clientSessions, ClientSessionChangeLogTransaction offlineClientSessions)
-
-
Method Details
-
begin
public void begin()- Specified by:
begin
in interfaceKeycloakTransaction
- Overrides:
begin
in classAbstractKeycloakTransaction
-
commitImpl
protected void commitImpl()- Specified by:
commitImpl
in classAbstractKeycloakTransaction
-
rollbackImpl
protected void rollbackImpl()- Specified by:
rollbackImpl
in classAbstractKeycloakTransaction
-
getClientSessions
-
getUserSessions
-
removeAllSessionsByRealmId
-
removeOnlineSessionsByRealmId
-
removeAllSessionByUserId
-
removeUserSessionById
-