Class ByRealmIdQueryConditionalRemover<K,V extends SessionEntity>

java.lang.Object
org.keycloak.models.sessions.infinispan.changes.remote.remover.query.ByRealmIdQueryConditionalRemover<K,V>
Type Parameters:
K - The key's type stored in the RemoteCache.
V - The value's type stored in the RemoteCache.
All Implemented Interfaces:
ConditionalRemover<K,V>

public class ByRealmIdQueryConditionalRemover<K,V extends SessionEntity> extends Object
A ConditionalRemover implementation to delete SessionEntity based on the realmId value.

This implementation uses Infinispan Ickle Queries to delete all entries belonging to the realm.

  • Constructor Details

    • ByRealmIdQueryConditionalRemover

      public ByRealmIdQueryConditionalRemover(String entity)
  • Method Details

    • removeByRealmId

      public void removeByRealmId(String realmId)
    • willRemove

      public boolean willRemove(K key, V value)
      Parameters:
      key - The entry's key to test.
      value - The entry's value to test.
      Returns:
      true if the entry will be removed from the RemoteCache.
    • executeRemovals

      public void executeRemovals(org.infinispan.client.hotrod.RemoteCache<K,V> cache, org.infinispan.commons.util.concurrent.AggregateCompletionStage<Void> stage)
      Description copied from interface: ConditionalRemover
      Executes the conditional removes in the RemoteCache.
      Specified by:
      executeRemovals in interface ConditionalRemover<K,V>
      Parameters:
      cache - The RemoteCache to perform the remove operations.
      stage - The AggregateCompletionStage to add any incomplete tasks.