Class PersistentSessionsChangelogBasedTransaction<K,V extends SessionEntity>
java.lang.Object
org.keycloak.models.AbstractKeycloakTransaction
org.keycloak.models.sessions.infinispan.changes.PersistentSessionsChangelogBasedTransaction<K,V>
- All Implemented Interfaces:
KeycloakTransaction
,SessionsChangelogBasedTransaction<K,
V>
- Direct Known Subclasses:
ClientSessionPersistentChangelogBasedTransaction
,UserSessionPersistentChangelogBasedTransaction
public abstract class PersistentSessionsChangelogBasedTransaction<K,V extends SessionEntity>
extends AbstractKeycloakTransaction
implements SessionsChangelogBasedTransaction<K,V>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.keycloak.models.AbstractKeycloakTransaction
AbstractKeycloakTransaction.TransactionState
-
Field Summary
Modifier and TypeFieldDescriptionprotected final KeycloakSession
protected final Map<K,
SessionUpdatesList<V>> protected final Map<K,
SessionUpdatesList<V>> Fields inherited from class org.keycloak.models.AbstractKeycloakTransaction
state
-
Constructor Summary
ConstructorDescriptionPersistentSessionsChangelogBasedTransaction
(KeycloakSession session, org.infinispan.Cache<K, SessionEntityWrapper<V>> cache, org.infinispan.Cache<K, SessionEntityWrapper<V>> offlineCache, RemoteCacheInvoker remoteCacheInvoker, SessionFunction<V> lifespanMsLoader, SessionFunction<V> maxIdleTimeMsLoader, SessionFunction<V> offlineLifespanMsLoader, SessionFunction<V> offlineMaxIdleTimeMsLoader, ArrayBlockingQueue<PersistentUpdate> batchingQueue, SerializeExecutionsByKey<K> serializerOnline, SerializeExecutionsByKey<K> serializerOffline) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTask
(K key, SessionUpdateTask<V> originalTask) void
addTask
(K key, SessionUpdateTask<V> task, V entity, UserSessionModel.SessionPersistenceState persistenceState) protected void
protected org.infinispan.Cache<K,
SessionEntityWrapper<V>> getCache
(boolean offline) protected SessionFunction<V>
getLifespanMsLoader
(boolean offline) protected SessionFunction<V>
getMaxIdleMsLoader
(boolean offline) protected Map<K,
SessionUpdatesList<V>> getUpdates
(boolean offline) void
reloadEntityInCurrentTransaction
(RealmModel realm, K key, SessionEntityWrapper<V> entity) protected void
Methods inherited from class org.keycloak.models.AbstractKeycloakTransaction
begin, commit, getRollbackOnly, getState, isActive, rollback, setRollbackOnly
-
Field Details
-
kcSession
-
updates
-
offlineUpdates
-
-
Constructor Details
-
PersistentSessionsChangelogBasedTransaction
public PersistentSessionsChangelogBasedTransaction(KeycloakSession session, org.infinispan.Cache<K, SessionEntityWrapper<V>> cache, org.infinispan.Cache<K, SessionEntityWrapper<V>> offlineCache, RemoteCacheInvoker remoteCacheInvoker, SessionFunction<V> lifespanMsLoader, SessionFunction<V> maxIdleTimeMsLoader, SessionFunction<V> offlineLifespanMsLoader, SessionFunction<V> offlineMaxIdleTimeMsLoader, ArrayBlockingQueue<PersistentUpdate> batchingQueue, SerializeExecutionsByKey<K> serializerOnline, SerializeExecutionsByKey<K> serializerOffline)
-
-
Method Details
-
getCache
-
getLifespanMsLoader
-
getMaxIdleMsLoader
-
getUpdates
-
get
-
commitImpl
protected void commitImpl()- Specified by:
commitImpl
in classAbstractKeycloakTransaction
-
addTask
- Specified by:
addTask
in interfaceSessionsChangelogBasedTransaction<K,
V extends SessionEntity>
-
addTask
public void addTask(K key, SessionUpdateTask<V> task, V entity, UserSessionModel.SessionPersistenceState persistenceState) -
reloadEntityInCurrentTransaction
public void reloadEntityInCurrentTransaction(RealmModel realm, K key, SessionEntityWrapper<V> entity) -
rollbackImpl
protected void rollbackImpl()- Specified by:
rollbackImpl
in classAbstractKeycloakTransaction
-