org.keycloak.models.cache.infinispan

## Class InfinispanUserCache

- java.lang.Object
- - org.keycloak.models.cache.infinispan.InfinispanUserCache

- All Implemented Interfaces:
    UserCache

      public class InfinispanUserCache
      extends Object
      implements UserCache

  Author:
    Stian Thorgersen

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.infinispan.Cache<String,CachedUser>` | `cache`
    `protected org.keycloak.models.cache.infinispan.InfinispanCacheUserProviderFactory.RealmLookup` | `emailLookup`
    `protected boolean` | `enabled`
    `protected static org.jboss.logging.Logger` | `logger`
    `protected org.keycloak.models.cache.infinispan.InfinispanCacheUserProviderFactory.RealmLookup` | `usernameLookup`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InfinispanUserCache(org.infinispan.Cache<String,CachedUser> cache, org.keycloak.models.cache.infinispan.InfinispanCacheUserProviderFactory.RealmLookup usernameLookup, org.keycloak.models.cache.infinispan.InfinispanCacheUserProviderFactory.RealmLookup emailLookup)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCachedUser(String realmId, CachedUser user)`
    `void` | `clear()`
    `CachedUser` | `getCachedUser(String realmId, String id)`
    `CachedUser` | `getCachedUserByEmail(String realmId, String email)`
    `CachedUser` | `getCachedUserByUsername(String realmId, String name)`
    `void` | `invalidateCachedUser(String realmId, CachedUser user)`
    `void` | `invalidateCachedUserById(String realmId, String id)`
    `void` | `invalidateRealmUsers(String realmId)`
    `boolean` | `isEnabled()`
    `void` | `setEnabled(boolean enabled)`

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

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

- - ### Field Detail

    - #### logger

          protected static final org.jboss.logging.Logger logger

    - #### enabled

          protected volatile boolean enabled

    - #### cache

          protected final org.infinispan.Cache<String,CachedUser> cache

    - #### usernameLookup

          protected final org.keycloak.models.cache.infinispan.InfinispanCacheUserProviderFactory.RealmLookup usernameLookup

    - #### emailLookup

          protected final org.keycloak.models.cache.infinispan.InfinispanCacheUserProviderFactory.RealmLookup emailLookup

  - ### Constructor Detail

    - #### InfinispanUserCache

          public InfinispanUserCache(org.infinispan.Cache<String,CachedUser> cache,
                             org.keycloak.models.cache.infinispan.InfinispanCacheUserProviderFactory.RealmLookup usernameLookup,
                             org.keycloak.models.cache.infinispan.InfinispanCacheUserProviderFactory.RealmLookup emailLookup)

  - ### Method Detail

    - #### isEnabled

          public boolean isEnabled()

      Specified by:
        `isEnabled` in interface `UserCache`

    - #### setEnabled

          public void setEnabled(boolean enabled)

      Specified by:
        `setEnabled` in interface `UserCache`

    - #### getCachedUser

          public CachedUser getCachedUser(String realmId,
                                 String id)

      Specified by:
        `getCachedUser` in interface `UserCache`

    - #### invalidateCachedUser

          public void invalidateCachedUser(String realmId,
                                  CachedUser user)

      Specified by:
        `invalidateCachedUser` in interface `UserCache`

    - #### invalidateCachedUserById

          public void invalidateCachedUserById(String realmId,
                                      String id)

      Specified by:
        `invalidateCachedUserById` in interface `UserCache`

    - #### addCachedUser

          public void addCachedUser(String realmId,
                           CachedUser user)

      Specified by:
        `addCachedUser` in interface `UserCache`

    - #### getCachedUserByUsername

          public CachedUser getCachedUserByUsername(String realmId,
                                           String name)

      Specified by:
        `getCachedUserByUsername` in interface `UserCache`

    - #### getCachedUserByEmail

          public CachedUser getCachedUserByEmail(String realmId,
                                        String email)

      Specified by:
        `getCachedUserByEmail` in interface `UserCache`

    - #### invalidateRealmUsers

          public void invalidateRealmUsers(String realmId)

      Specified by:
        `invalidateRealmUsers` in interface `UserCache`

    - #### clear

          public void clear()

      Specified by:
        `clear` in interface `UserCache`

Copyright © 2014. All Rights Reserved.