Enum Class LoginFailureExpirationAction

java.lang.Object
java.lang.Enum<LoginFailureExpirationAction>
org.keycloak.loginfailures.jpa.LoginFailureExpirationAction
All Implemented Interfaces:
Serializable, Comparable<LoginFailureExpirationAction>, Constable, ExpirationAction

public enum LoginFailureExpirationAction extends Enum<LoginFailureExpirationAction> implements ExpirationAction
  • Enum Constant Details

  • Method Details

    • values

      public static LoginFailureExpirationAction[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static LoginFailureExpirationAction valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • removeExpired

      public boolean removeExpired(KeycloakSession session, String realmId, int currentTime, int maxRemoval, IntConsumer removeCount)
      Description copied from interface: ExpirationAction
      Removes expired entries from the database.

      This method is invoked inside a transaction. It should delete a batch of expired entries whose expiration time is at or before currentTime and report the number of removed rows via removeCount.

      Specified by:
      removeExpired in interface ExpirationAction
      Parameters:
      session - the current Keycloak session, valid for the duration of the enclosing transaction.
      realmId - the realm to clean up, or null for non-realm-aware expiration tasks.
      currentTime - the current time in seconds since epoch, used as the expiration threshold. This value is constant across all batches within a single task run.
      maxRemoval - the maximum number of entries to remove in this batch.
      removeCount - a consumer to report the number of entries removed in this batch.
      Returns:
      true if there are more expired entries to remove (the framework will call this method again in a new transaction); false if all expired entries have been removed.