Class InfinispanKeycloakTransaction

java.lang.Object
org.keycloak.models.sessions.infinispan.InfinispanKeycloakTransaction
All Implemented Interfaces:
NonBlockingTransaction

public class InfinispanKeycloakTransaction extends Object implements NonBlockingTransaction
Author:
Stian Thorgersen
  • Constructor Details

    • InfinispanKeycloakTransaction

      public InfinispanKeycloakTransaction()
  • Method Details

    • asyncCommit

      public void asyncCommit(org.infinispan.commons.util.concurrent.AggregateCompletionStage<Void> stage, Consumer<DatabaseUpdate> databaseUpdates)
      Description copied from interface: NonBlockingTransaction
      Asynchronously commits the transaction.

      The implementation should not block the thread and add any (or none) CompletionStage into the stage.

      Any blocking operation should be consumed by the databaseUpdates. It will be executed at a later instant.

      Specified by:
      asyncCommit in interface NonBlockingTransaction
      Parameters:
      stage - The AggregateCompletionStage to collect the CompletionStage.
      databaseUpdates - The Consumer to use for blocking/database updates.
    • asyncRollback

      public void asyncRollback(org.infinispan.commons.util.concurrent.AggregateCompletionStage<Void> stage)
      Description copied from interface: NonBlockingTransaction
      Asynchronously rollbacks the transaction.

      The implementation should not block the thread and add any (or none) CompletionStage into the stage.

      Specified by:
      asyncRollback in interface NonBlockingTransaction
      Parameters:
      stage - The AggregateCompletionStage to collect the CompletionStage.
    • put

      public <K, V> void put(org.infinispan.commons.api.BasicCache<K,V> cache, K key, V value, long lifespan, TimeUnit lifespanUnit)
    • replace

      public <K, V> void replace(org.infinispan.Cache<K,V> cache, K key, V value, long lifespan, TimeUnit lifespanUnit)
    • remove

      public <K, V> void remove(org.infinispan.commons.api.BasicCache<K,V> cache, K key)
    • get

      public <K, V> V get(org.infinispan.commons.api.BasicCache<K,V> cache, K key)