org.keycloak.models.map.storage.chm

## Class ConcurrentHashMapStorageProviderFactory

- java.lang.Object
- - org.keycloak.models.map.storage.chm.ConcurrentHashMapStorageProviderFactory

- All Implemented Interfaces:
    AmphibianProviderFactory<MapStorageProvider>, ComponentFactory<MapStorageProvider,MapStorageProvider>, MapStorageProviderFactory, ConfiguredProvider, EnvironmentDependentProviderFactory, ProviderFactory<MapStorageProvider>

      public class ConcurrentHashMapStorageProviderFactory
      extends Object
      implements AmphibianProviderFactory<MapStorageProvider>, MapStorageProviderFactory, EnvironmentDependentProviderFactory

  Author:
    hmlnarik

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.keycloak.models.map.storage.MapStorageProviderFactory

      `MapStorageProviderFactory.Flag`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Map<Class<?>,String>` | `MODEL_TO_NAME`
    `static String` | `PROVIDER_ID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConcurrentHashMapStorageProviderFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` This is called when the server shuts down.
    `MapStorageProvider` | `create(KeycloakSession session)`
    `List<ProviderConfigProperty>` | `getConfigProperties()`
    `String` | `getHelpText()`
    `String` | `getId()`
    `<K,V extends AbstractEntity<K>,M> ConcurrentHashMapStorage<K,V,M>` | `getStorage(Class<V> valueType, Class<M> modelType, MapStorageProviderFactory.Flag... flags)`
    `void` | `init(Config.Scope config)` Only called once when the factory is first created.
    `boolean` | `isSupported()`
    `void` | `postInit(KeycloakSessionFactory factory)` Called after all provider factories have been initialized

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

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

    - ### Methods inherited from interface org.keycloak.component.AmphibianProviderFactory

      `create, onUpdate, preRemove`

    - ### Methods inherited from interface org.keycloak.component.ComponentFactory

      `getCommonProviderConfigProperties, getTypeMetadata, onCreate, validateConfiguration`

- - ### Field Detail

    - #### PROVIDER_ID

          public static final String PROVIDER_ID

      See Also:
        Constant Field Values

    - #### MODEL_TO_NAME

          public static final Map<Class<?>,String> MODEL_TO_NAME

  - ### Constructor Detail

    - #### ConcurrentHashMapStorageProviderFactory

          public ConcurrentHashMapStorageProviderFactory()

  - ### Method Detail

    - #### create

          public MapStorageProvider create(KeycloakSession session)

      Specified by:
        `create` in interface `AmphibianProviderFactory<MapStorageProvider>`
      Specified by:
        `create` in interface `ComponentFactory<MapStorageProvider,MapStorageProvider>`
      Specified by:
        `create` in interface `ProviderFactory<MapStorageProvider>`

    - #### init

          public void init(Config.Scope config)

      Description copied from interface: `ProviderFactory`
      Only called once when the factory is first created. This config is pulled from keycloak_server.json
      Specified by:
        `init` in interface `ProviderFactory<MapStorageProvider>`

    - #### postInit

          public void postInit(KeycloakSessionFactory factory)

      Description copied from interface: `ProviderFactory`
      Called after all provider factories have been initialized
      Specified by:
        `postInit` in interface `ProviderFactory<MapStorageProvider>`

    - #### close

          public void close()

      Description copied from interface: `ProviderFactory`
      This is called when the server shuts down.
      Specified by:
        `close` in interface `AmphibianProviderFactory<MapStorageProvider>`
      Specified by:
        `close` in interface `ProviderFactory<MapStorageProvider>`

    - #### getId

          public String getId()

      Specified by:
        `getId` in interface `ProviderFactory<MapStorageProvider>`

    - #### getStorage

          public <K,V extends AbstractEntity<K>,M> ConcurrentHashMapStorage<K,V,M> getStorage(Class<V> valueType,
                                                                                              Class<M> modelType,
                                                                                              MapStorageProviderFactory.Flag... flags)

    - #### getHelpText

          public String getHelpText()

      Specified by:
        `getHelpText` in interface `ConfiguredProvider`

    - #### getConfigProperties

          public List<ProviderConfigProperty> getConfigProperties()

      Specified by:
        `getConfigProperties` in interface `AmphibianProviderFactory<MapStorageProvider>`
      Specified by:
        `getConfigProperties` in interface `ConfiguredProvider`

    - #### isSupported

          public boolean isSupported()

      Specified by:
        `isSupported` in interface `EnvironmentDependentProviderFactory`
      Returns:
        `true` if the provider is supported and should be available, `false` otherwise

Copyright © 2021 JBoss by Red Hat. All rights reserved.