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
FieldsModifier and TypeFieldDescriptionprotected final KeycloakSessionprotected final Map<K,SessionUpdatesList<V>> protected final Map<K,SessionUpdatesList<V>> Fields inherited from class org.keycloak.models.AbstractKeycloakTransaction
state -
Constructor Summary
ConstructorsConstructorDescriptionPersistentSessionsChangelogBasedTransaction(KeycloakSession session, String cacheName, 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 TypeMethodDescriptionvoidaddTask(K key, SessionUpdateTask<V> originalTask) voidaddTask(K key, SessionUpdateTask<V> task, V entity, UserSessionModel.SessionPersistenceState persistenceState) protected voidprotected 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) voidreloadEntityInCurrentTransaction(RealmModel realm, K key, SessionEntityWrapper<V> entity) protected voidMethods inherited from class org.keycloak.models.AbstractKeycloakTransaction
begin, beginImpl, commit, getRollbackOnly, getState, isActive, rollback, setRollbackOnly
-
Field Details
-
kcSession
-
updates
-
offlineUpdates
-
-
Constructor Details
-
PersistentSessionsChangelogBasedTransaction
public PersistentSessionsChangelogBasedTransaction(KeycloakSession session, String cacheName, 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:
commitImplin classAbstractKeycloakTransaction
-
addTask
- Specified by:
addTaskin 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:
rollbackImplin classAbstractKeycloakTransaction
-