Class RemoteChangeLogTransaction<K,V,T extends Updater<K,V>,R extends ConditionalRemover<K,V>>
java.lang.Object
org.keycloak.models.AbstractKeycloakTransaction
org.keycloak.models.sessions.infinispan.remote.transaction.RemoteChangeLogTransaction<K,V,T,R>
- Type Parameters:
K
- The type of the Infinispan cache key.V
- The type of the Infinispan cache value.T
- The type of theUpdater
implementation.
- All Implemented Interfaces:
KeycloakTransaction
- Direct Known Subclasses:
AuthenticationSessionChangeLogTransaction
,ClientSessionChangeLogTransaction
,LoginFailureChangeLogTransaction
,UserSessionChangeLogTransaction
public class RemoteChangeLogTransaction<K,V,T extends Updater<K,V>,R extends ConditionalRemover<K,V>>
extends AbstractKeycloakTransaction
A
KeycloakTransaction
implementation that keeps track of changes made to entities stored in a Infinispan
cache.-
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
commitAsync
(org.infinispan.commons.util.concurrent.AggregateCompletionStage<Void> stage) protected void
Tracks a new value to be created in the Infinispan cache.Fetches the value associated to thekey
.Nonblocking alternative ofget(Object)
getCache()
void
Removes thekey
from theRemoteCache
.protected void
Methods inherited from class org.keycloak.models.AbstractKeycloakTransaction
begin, beginImpl, commit, getRollbackOnly, getState, isActive, rollback, setRollbackOnly
-
Method Details
-
commitImpl
protected void commitImpl()- Specified by:
commitImpl
in classAbstractKeycloakTransaction
-
rollbackImpl
protected void rollbackImpl()- Specified by:
rollbackImpl
in classAbstractKeycloakTransaction
-
commitAsync
public void commitAsync(org.infinispan.commons.util.concurrent.AggregateCompletionStage<Void> stage) -
getCache
- Returns:
- The
RemoteCache
tracked by the transaction.
-
get
Fetches the value associated to thekey
.It fetches the value from the
RemoteCache
if a copy does not exist in the transaction.- Parameters:
key
- The Infinispan cache key to fetch.- Returns:
- The
Updater
to track further changes of the Infinispan cache value.
-
getAsync
Nonblocking alternative ofget(Object)
- Parameters:
key
- The Infinispan cache key to fetch.- Returns:
- The
Updater
to track further changes of the Infinispan cache value.
-
create
Tracks a new value to be created in the Infinispan cache.- Parameters:
key
- The Infinispan cache key to be associated to the value.entity
- The Infinispan cache value.- Returns:
- The
Updater
to track further changes of the Infinispan cache value.
-
remove
Removes thekey
from theRemoteCache
.- Parameters:
key
- The Infinispan cache key to remove.
-
wrap
-
wrap
-
getCachedEntities
-