org.keycloak.models.sessions.infinispan

## Class InfinispanUserLoginFailureProvider

- java.lang.Object
- - org.keycloak.models.sessions.infinispan.InfinispanUserLoginFailureProvider

- All Implemented Interfaces:
    UserLoginFailureProvider, Provider

      public class InfinispanUserLoginFailureProvider
      extends Object
      implements UserLoginFailureProvider

  Author:
    Martin Kanis

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected SessionEventsSenderTransaction` | `clusterEventsSenderTx`
    `protected org.infinispan.Cache<LoginFailureKey,SessionEntityWrapper<LoginFailureEntity>>` | `loginFailureCache`
    `protected InfinispanChangelogBasedTransaction<LoginFailureKey,LoginFailureEntity>` | `loginFailuresTx`
    `protected KeycloakSession` | `session`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InfinispanUserLoginFailureProvider(KeycloakSession session, RemoteCacheInvoker remoteCacheInvoker, org.infinispan.Cache<LoginFailureKey,SessionEntityWrapper<LoginFailureEntity>> loginFailureCache)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `UserLoginFailureModel` | `addUserLoginFailure(RealmModel realm, String userId)` Adds a `UserLoginFailureModel` for the given realm and user id.
    `void` | `close()`
    `UserLoginFailureModel` | `getUserLoginFailure(RealmModel realm, String userId)` Returns the `UserLoginFailureModel` for the given realm and user id.
    `protected void` | `removeAllLocalUserLoginFailuresEvent(String realmId)`
    `void` | `removeAllUserLoginFailures(RealmModel realm)` Removes all the `UserLoginFailureModel` for the given realm.
    `void` | `removeUserLoginFailure(RealmModel realm, String userId)` Removes a `UserLoginFailureModel` for the given realm and user id.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### session

          protected final KeycloakSession session

    - #### loginFailureCache

          protected final org.infinispan.Cache<LoginFailureKey,SessionEntityWrapper<LoginFailureEntity>> loginFailureCache

    - #### loginFailuresTx

          protected final InfinispanChangelogBasedTransaction<LoginFailureKey,LoginFailureEntity> loginFailuresTx

    - #### clusterEventsSenderTx

          protected final SessionEventsSenderTransaction clusterEventsSenderTx

  - ### Constructor Detail

    - #### InfinispanUserLoginFailureProvider

          public InfinispanUserLoginFailureProvider(KeycloakSession session,
                                                    RemoteCacheInvoker remoteCacheInvoker,
                                                    org.infinispan.Cache<LoginFailureKey,SessionEntityWrapper<LoginFailureEntity>> loginFailureCache)

  - ### Method Detail

    - #### getUserLoginFailure

          public UserLoginFailureModel getUserLoginFailure(RealmModel realm,
                                                           String userId)

      Description copied from interface: `UserLoginFailureProvider`
      Returns the `UserLoginFailureModel` for the given realm and user id.
      Specified by:
        `getUserLoginFailure` in interface `UserLoginFailureProvider`
      Parameters:
        `realm` - `RealmModel`
        `userId` - `String` Id of the user.
      Returns:
        Returns the `UserLoginFailureModel` for the given realm and user id.

    - #### addUserLoginFailure

          public UserLoginFailureModel addUserLoginFailure(RealmModel realm,
                                                           String userId)

      Description copied from interface: `UserLoginFailureProvider`
      Adds a `UserLoginFailureModel` for the given realm and user id.
      Specified by:
        `addUserLoginFailure` in interface `UserLoginFailureProvider`
      Parameters:
        `realm` - `RealmModel`
        `userId` - `String` Id of the user.
      Returns:
        Returns newly created `UserLoginFailureModel`.

    - #### removeUserLoginFailure

          public void removeUserLoginFailure(RealmModel realm,
                                             String userId)

      Description copied from interface: `UserLoginFailureProvider`
      Removes a `UserLoginFailureModel` for the given realm and user id.
      Specified by:
        `removeUserLoginFailure` in interface `UserLoginFailureProvider`
      Parameters:
        `realm` - `RealmModel`
        `userId` - `String` Id of the user.

    - #### removeAllUserLoginFailures

          public void removeAllUserLoginFailures(RealmModel realm)

      Description copied from interface: `UserLoginFailureProvider`
      Removes all the `UserLoginFailureModel` for the given realm.
      Specified by:
        `removeAllUserLoginFailures` in interface `UserLoginFailureProvider`
      Parameters:
        `realm` - `RealmModel`

    - #### removeAllLocalUserLoginFailuresEvent

          protected void removeAllLocalUserLoginFailuresEvent(String realmId)

    - #### close

          public void close()

      Specified by:
        `close` in interface `Provider`

Copyright © 2021 JBoss by Red Hat. All rights reserved.