Type Parameters:
K - The Infinispan key type.
V - The Infinispan value type.
All Superinterfaces:
BiFunction<K,V,V>
All Known Implementing Classes:
AuthenticatedClientSessionUpdater, BaseUpdater, LoginFailuresUpdater, RootAuthenticationSessionUpdater, UserSessionUpdater

public interface Updater<K,V> extends BiFunction<K,V,V>
An interface used by RemoteChangeLogTransaction.

It keeps track of the changes made in the entity and applies them to the entity stored in Infinispan cache.

  • Field Details

  • Method Details

    • getKey

      K getKey()
      Returns:
      The Infinispan cache key.
    • getValue

      V getValue()
      Returns:
      The up-to-date entity used by the transaction.
    • getVersionRead

      long getVersionRead()
      Returns:
      The entity version when reading for the first time from Infinispan.
    • isDeleted

      boolean isDeleted()
      Returns:
      true if the entity was removed during the Keycloak transaction and it should be removed from Infinispan.
    • isCreated

      boolean isCreated()
      Returns:
      true if the entity was created during the Keycloak transaction. Allows some optimization like put-if-absent.
    • isReadOnly

      boolean isReadOnly()
      Returns:
      true if the entity was not changed.
    • markDeleted

      void markDeleted()
      Marks the entity as deleted.
    • isTransient

      default boolean isTransient()
      Returns:
      true if the entity is transient and shouldn't be stored in the Infinispan cache.
    • computeExpiration

      Expiration computeExpiration()
      Computes the expiration data for Infinispan cache.
      Returns:
      The Expiration data.
    • hasVersion

      default boolean hasVersion()