Class UserSessionQueryConditionalRemover

java.lang.Object
org.keycloak.models.sessions.infinispan.changes.remote.remover.query.UserSessionQueryConditionalRemover
All Implemented Interfaces:
ConditionalRemover<String,RemoteUserSessionEntity>

public class UserSessionQueryConditionalRemover extends Object
A ConditionalRemover implementation to remove RemoteUserSessionEntity based on some filters over its state.

This implementation uses Infinispan Ickle Queries to perform the removal operation. Indexing is not required.

  • Constructor Details

    • UserSessionQueryConditionalRemover

      public UserSessionQueryConditionalRemover()
  • Method Details

    • removeByRealmId

      public void removeByRealmId(String realmId)
    • removeByUserId

      public void removeByUserId(String realmId, String userId)
    • willRemove

      public boolean willRemove(String key, RemoteUserSessionEntity 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<String,RemoteUserSessionEntity> 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.