org.keycloak.models.cache

## Class DefaultCacheRealmProvider

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

- All Implemented Interfaces:
    CacheRealmProvider, RealmProvider, Provider

      public class DefaultCacheRealmProvider
      extends Object
      implements CacheRealmProvider

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Set<String>` | `appInvalidations`
    `protected RealmCache` | `cache`
    `protected boolean` | `clearAll`
    `protected Set<String>` | `clientInvalidations`
    `protected RealmProvider` | `delegate`
    `protected Map<String,ApplicationModel>` | `managedApplications`
    `protected Map<String,OAuthClientModel>` | `managedClients`
    `protected Map<String,RealmModel>` | `managedRealms`
    `protected Map<String,RoleModel>` | `managedRoles`
    `protected Set<String>` | `realmInvalidations`
    `protected Set<String>` | `roleInvalidations`
    `protected KeycloakSession` | `session`
    `protected boolean` | `setRollbackOnly`
    `protected boolean` | `transactionActive`
    `protected Set<String>` | `userInvalidations`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultCacheRealmProvider(RealmCache cache, KeycloakSession session)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `RealmModel` | `createRealm(String name)`
    `RealmModel` | `createRealm(String id, String name)`
    `ApplicationModel` | `getApplicationById(String id, RealmModel realm)`
    `RealmProvider` | `getDelegate()`
    `OAuthClientModel` | `getOAuthClientById(String id, RealmModel realm)`
    `RealmModel` | `getRealm(String id)`
    `RealmModel` | `getRealmByName(String name)`
    `List<RealmModel>` | `getRealms()`
    `RoleModel` | `getRoleById(String id, RealmModel realm)`
    `boolean` | `isEnabled()`
    `void` | `registerApplicationInvalidation(String id)`
    `void` | `registerOAuthClientInvalidation(String id)`
    `void` | `registerRealmInvalidation(String id)`
    `void` | `registerRoleInvalidation(String id)`
    `void` | `registerUserInvalidation(String id)`
    `boolean` | `removeRealm(String id)`
    `protected void` | `runInvalidations()`
    `void` | `setEnabled(boolean enabled)`

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

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

- - ### Field Detail

    - #### cache

          protected RealmCache cache

    - #### session

          protected KeycloakSession session

    - #### delegate

          protected RealmProvider delegate

    - #### transactionActive

          protected boolean transactionActive

    - #### setRollbackOnly

          protected boolean setRollbackOnly

    - #### realmInvalidations

          protected Set<String> realmInvalidations

    - #### appInvalidations

          protected Set<String> appInvalidations

    - #### roleInvalidations

          protected Set<String> roleInvalidations

    - #### clientInvalidations

          protected Set<String> clientInvalidations

    - #### userInvalidations

          protected Set<String> userInvalidations

    - #### managedRealms

          protected Map<String,RealmModel> managedRealms

    - #### managedApplications

          protected Map<String,ApplicationModel> managedApplications

    - #### managedClients

          protected Map<String,OAuthClientModel> managedClients

    - #### managedRoles

          protected Map<String,RoleModel> managedRoles

    - #### clearAll

          protected boolean clearAll

  - ### Constructor Detail

    - #### DefaultCacheRealmProvider

          public DefaultCacheRealmProvider(RealmCache cache,
                                   KeycloakSession session)

  - ### Method Detail

    - #### isEnabled

          public boolean isEnabled()

      Specified by:
        `isEnabled` in interface `CacheRealmProvider`

    - #### setEnabled

          public void setEnabled(boolean enabled)

      Specified by:
        `setEnabled` in interface `CacheRealmProvider`

    - #### getDelegate

          public RealmProvider getDelegate()

      Specified by:
        `getDelegate` in interface `CacheRealmProvider`

    - #### registerRealmInvalidation

          public void registerRealmInvalidation(String id)

      Specified by:
        `registerRealmInvalidation` in interface `CacheRealmProvider`

    - #### registerApplicationInvalidation

          public void registerApplicationInvalidation(String id)

      Specified by:
        `registerApplicationInvalidation` in interface `CacheRealmProvider`

    - #### registerRoleInvalidation

          public void registerRoleInvalidation(String id)

      Specified by:
        `registerRoleInvalidation` in interface `CacheRealmProvider`

    - #### registerOAuthClientInvalidation

          public void registerOAuthClientInvalidation(String id)

      Specified by:
        `registerOAuthClientInvalidation` in interface `CacheRealmProvider`

    - #### registerUserInvalidation

          public void registerUserInvalidation(String id)

      Specified by:
        `registerUserInvalidation` in interface `CacheRealmProvider`

    - #### runInvalidations

          protected void runInvalidations()

    - #### createRealm

          public RealmModel createRealm(String name)

      Specified by:
        `createRealm` in interface `RealmProvider`

    - #### createRealm

          public RealmModel createRealm(String id,
                               String name)

      Specified by:
        `createRealm` in interface `RealmProvider`

    - #### getRealm

          public RealmModel getRealm(String id)

      Specified by:
        `getRealm` in interface `RealmProvider`

    - #### getRealmByName

          public RealmModel getRealmByName(String name)

      Specified by:
        `getRealmByName` in interface `RealmProvider`

    - #### getRealms

          public List<RealmModel> getRealms()

      Specified by:
        `getRealms` in interface `RealmProvider`

    - #### removeRealm

          public boolean removeRealm(String id)

      Specified by:
        `removeRealm` in interface `RealmProvider`

    - #### close

          public void close()

      Specified by:
        `close` in interface `RealmProvider`
      Specified by:
        `close` in interface `Provider`

    - #### getRoleById

          public RoleModel getRoleById(String id,
                              RealmModel realm)

      Specified by:
        `getRoleById` in interface `RealmProvider`

    - #### getApplicationById

          public ApplicationModel getApplicationById(String id,
                                            RealmModel realm)

      Specified by:
        `getApplicationById` in interface `RealmProvider`

    - #### getOAuthClientById

          public OAuthClientModel getOAuthClientById(String id,
                                            RealmModel realm)

      Specified by:
        `getOAuthClientById` in interface `RealmProvider`

Copyright © 2014. All Rights Reserved.