Class ClientSessionQueryConditionalRemover

java.lang.Object
org.keycloak.models.sessions.infinispan.changes.remote.remover.query.ClientSessionQueryConditionalRemover
All Implemented Interfaces:
ConditionalRemover<ClientSessionKey,RemoteAuthenticatedClientSessionEntity>

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

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

  • Constructor Details

    • ClientSessionQueryConditionalRemover

      public ClientSessionQueryConditionalRemover()
  • Method Details

    • removeByUserSessionId

      public void removeByUserSessionId(String userSessionId)
    • removeByRealmId

      public void removeByRealmId(String realmId)
    • removeByUserId

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

      public boolean willRemove(ClientSessionKey key, RemoteAuthenticatedClientSessionEntity 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<ClientSessionKey,RemoteAuthenticatedClientSessionEntity> 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.