org.keycloak.models.cache

## Class SimpleCache

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

- All Implemented Interfaces:
    KeycloakCache

      public class SimpleCache
      extends Object
      implements KeycloakCache

  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 ConcurrentHashMap<String,CachedRealm>` | `realmCache`
    `protected ConcurrentHashMap<String,CachedRealm>` | `realmCacheByName`
    `protected ConcurrentHashMap<String,CachedRole>` | `roleCache`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleCache()`

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

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

  - ### Constructor Detail

    - #### SimpleCache

          public SimpleCache()

  - ### Method Detail

    - #### clear

          public void clear()

      Specified by:
        `clear` in interface `KeycloakCache`

    - #### getCachedRealm

          public CachedRealm getCachedRealm(String id)

      Specified by:
        `getCachedRealm` in interface `KeycloakCache`

    - #### invalidateCachedRealm

          public void invalidateCachedRealm(CachedRealm realm)

      Specified by:
        `invalidateCachedRealm` in interface `KeycloakCache`

    - #### invalidateCachedRealmById

          public void invalidateCachedRealmById(String id)

      Specified by:
        `invalidateCachedRealmById` in interface `KeycloakCache`

    - #### addCachedRealm

          public void addCachedRealm(CachedRealm realm)

      Specified by:
        `addCachedRealm` in interface `KeycloakCache`

    - #### getCachedRealmByName

          public CachedRealm getCachedRealmByName(String name)

      Specified by:
        `getCachedRealmByName` in interface `KeycloakCache`

    - #### getApplication

          public CachedApplication getApplication(String id)

      Specified by:
        `getApplication` in interface `KeycloakCache`

    - #### invalidateApplication

          public void invalidateApplication(CachedApplication app)

      Specified by:
        `invalidateApplication` in interface `KeycloakCache`

    - #### addCachedApplication

          public void addCachedApplication(CachedApplication app)

      Specified by:
        `addCachedApplication` in interface `KeycloakCache`

    - #### invalidateCachedApplicationById

          public void invalidateCachedApplicationById(String id)

      Specified by:
        `invalidateCachedApplicationById` in interface `KeycloakCache`

    - #### getOAuthClient

          public CachedOAuthClient getOAuthClient(String id)

      Specified by:
        `getOAuthClient` in interface `KeycloakCache`

    - #### invalidateOAuthClient

          public void invalidateOAuthClient(CachedOAuthClient client)

      Specified by:
        `invalidateOAuthClient` in interface `KeycloakCache`

    - #### addCachedOAuthClient

          public void addCachedOAuthClient(CachedOAuthClient client)

      Specified by:
        `addCachedOAuthClient` in interface `KeycloakCache`

    - #### invalidateCachedOAuthClientById

          public void invalidateCachedOAuthClientById(String id)

      Specified by:
        `invalidateCachedOAuthClientById` in interface `KeycloakCache`

    - #### getRole

          public CachedRole getRole(String id)

      Specified by:
        `getRole` in interface `KeycloakCache`

    - #### invalidateRole

          public void invalidateRole(CachedRole role)

      Specified by:
        `invalidateRole` in interface `KeycloakCache`

    - #### invalidateRoleById

          public void invalidateRoleById(String id)

      Specified by:
        `invalidateRoleById` in interface `KeycloakCache`

    - #### addCachedRole

          public void addCachedRole(CachedRole role)

      Specified by:
        `addCachedRole` in interface `KeycloakCache`

    - #### invalidateCachedRoleById

          public void invalidateCachedRoleById(String id)

      Specified by:
        `invalidateCachedRoleById` in interface `KeycloakCache`

Copyright © 2014. All Rights Reserved.