org.keycloak.models.cache.infinispan

## Class InfinispanRealmCache

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

- All Implemented Interfaces:
    RealmCache

      public class InfinispanRealmCache
      extends Object
      implements RealmCache

  Author:
    Stian Thorgersen

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.infinispan.Cache<String,Object>` | `cache`
    `protected boolean` | `enabled`
    `protected static org.jboss.logging.Logger` | `logger`
    `protected ConcurrentHashMap<String,String>` | `realmLookup`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InfinispanRealmCache(org.infinispan.Cache<String,Object> cache, ConcurrentHashMap<String,String> realmLookup)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCachedApplication(CachedApplication app)`
    `void` | `addCachedOAuthClient(CachedOAuthClient client)`
    `void` | `addCachedRealm(CachedRealm realm)`
    `void` | `addCachedRole(CachedRole role)`
    `void` | `clear()`
    `CachedApplication` | `getApplication(String id)`
    `CachedRealm` | `getCachedRealm(String id)`
    `CachedRealm` | `getCachedRealmByName(String name)`
    `CachedOAuthClient` | `getOAuthClient(String id)`
    `CachedRole` | `getRole(String id)`
    `void` | `invalidateApplication(CachedApplication app)`
    `void` | `invalidateCachedApplicationById(String id)`
    `void` | `invalidateCachedOAuthClientById(String id)`
    `void` | `invalidateCachedRealm(CachedRealm realm)`
    `void` | `invalidateCachedRealmById(String id)`
    `void` | `invalidateCachedRoleById(String id)`
    `void` | `invalidateOAuthClient(CachedOAuthClient client)`
    `void` | `invalidateRole(CachedRole role)`
    `void` | `invalidateRoleById(String id)`
    `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

    - #### cache

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

    - #### realmLookup

          protected final ConcurrentHashMap<String,String> realmLookup

    - #### enabled

          protected volatile boolean enabled

  - ### Constructor Detail

    - #### InfinispanRealmCache

          public InfinispanRealmCache(org.infinispan.Cache<String,Object> cache,
                              ConcurrentHashMap<String,String> realmLookup)

  - ### Method Detail

    - #### clear

          public void clear()

      Specified by:
        `clear` in interface `RealmCache`

    - #### isEnabled

          public boolean isEnabled()

      Specified by:
        `isEnabled` in interface `RealmCache`

    - #### setEnabled

          public void setEnabled(boolean enabled)

      Specified by:
        `setEnabled` in interface `RealmCache`

    - #### getCachedRealm

          public CachedRealm getCachedRealm(String id)

      Specified by:
        `getCachedRealm` in interface `RealmCache`

    - #### invalidateCachedRealm

          public void invalidateCachedRealm(CachedRealm realm)

      Specified by:
        `invalidateCachedRealm` in interface `RealmCache`

    - #### invalidateCachedRealmById

          public void invalidateCachedRealmById(String id)

      Specified by:
        `invalidateCachedRealmById` in interface `RealmCache`

    - #### addCachedRealm

          public void addCachedRealm(CachedRealm realm)

      Specified by:
        `addCachedRealm` in interface `RealmCache`

    - #### getCachedRealmByName

          public CachedRealm getCachedRealmByName(String name)

      Specified by:
        `getCachedRealmByName` in interface `RealmCache`

    - #### getApplication

          public CachedApplication getApplication(String id)

      Specified by:
        `getApplication` in interface `RealmCache`

    - #### invalidateApplication

          public void invalidateApplication(CachedApplication app)

      Specified by:
        `invalidateApplication` in interface `RealmCache`

    - #### addCachedApplication

          public void addCachedApplication(CachedApplication app)

      Specified by:
        `addCachedApplication` in interface `RealmCache`

    - #### invalidateCachedApplicationById

          public void invalidateCachedApplicationById(String id)

      Specified by:
        `invalidateCachedApplicationById` in interface `RealmCache`

    - #### getOAuthClient

          public CachedOAuthClient getOAuthClient(String id)

      Specified by:
        `getOAuthClient` in interface `RealmCache`

    - #### invalidateOAuthClient

          public void invalidateOAuthClient(CachedOAuthClient client)

      Specified by:
        `invalidateOAuthClient` in interface `RealmCache`

    - #### addCachedOAuthClient

          public void addCachedOAuthClient(CachedOAuthClient client)

      Specified by:
        `addCachedOAuthClient` in interface `RealmCache`

    - #### invalidateCachedOAuthClientById

          public void invalidateCachedOAuthClientById(String id)

      Specified by:
        `invalidateCachedOAuthClientById` in interface `RealmCache`

    - #### getRole

          public CachedRole getRole(String id)

      Specified by:
        `getRole` in interface `RealmCache`

    - #### invalidateRole

          public void invalidateRole(CachedRole role)

      Specified by:
        `invalidateRole` in interface `RealmCache`

    - #### invalidateRoleById

          public void invalidateRoleById(String id)

      Specified by:
        `invalidateRoleById` in interface `RealmCache`

    - #### addCachedRole

          public void addCachedRole(CachedRole role)

      Specified by:
        `addCachedRole` in interface `RealmCache`

    - #### invalidateCachedRoleById

          public void invalidateCachedRoleById(String id)

      Specified by:
        `invalidateCachedRoleById` in interface `RealmCache`

Copyright © 2014. All Rights Reserved.