org.keycloak.models.cache

## Class MemoryRealmCache

- java.lang.Object
- - org.keycloak.models.cache.MemoryRealmCache

- All Implemented Interfaces:
    RealmCache

      public class MemoryRealmCache
      extends Object
      implements RealmCache

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ConcurrentHashMap<String,CachedApplication>` | `applicationCache`
    `protected ConcurrentHashMap<String,CachedOAuthClient>` | `clientCache`
    `protected boolean` | `enabled`
    `protected ConcurrentHashMap<String,CachedRealm>` | `realmCache`
    `protected ConcurrentHashMap<String,CachedRealm>` | `realmCacheByName`
    `protected ConcurrentHashMap<String,CachedRole>` | `roleCache`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MemoryRealmCache()`

  - ### 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

    - #### realmCache

          protected ConcurrentHashMap<String,CachedRealm> realmCache

    - #### realmCacheByName

          protected ConcurrentHashMap<String,CachedRealm> realmCacheByName

    - #### applicationCache

          protected ConcurrentHashMap<String,CachedApplication> applicationCache

    - #### clientCache

          protected ConcurrentHashMap<String,CachedOAuthClient> clientCache

    - #### roleCache

          protected ConcurrentHashMap<String,CachedRole> roleCache

    - #### enabled

          protected volatile boolean enabled

  - ### Constructor Detail

    - #### MemoryRealmCache

          public MemoryRealmCache()

  - ### 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.