Package org.keycloak.models.map.lock
Class MapGlobalLockProviderFactory
java.lang.Object
org.keycloak.models.map.common.AbstractMapProviderFactory<GlobalLockProvider,MapLockEntity,MapLockEntity>
org.keycloak.models.map.lock.MapGlobalLockProviderFactory
- All Implemented Interfaces:
AmphibianProviderFactory<GlobalLockProvider>
,ComponentFactory<GlobalLockProvider,
,GlobalLockProvider> GlobalLockProviderFactory
,ConfiguredProvider
,EnvironmentDependentProviderFactory
,ProviderFactory<GlobalLockProvider>
public class MapGlobalLockProviderFactory
extends AbstractMapProviderFactory<GlobalLockProvider,MapLockEntity,MapLockEntity>
implements GlobalLockProviderFactory, EnvironmentDependentProviderFactory
Factory to create a GlobalLockProvider backed by a Map store.
- Author:
- Alexander Schwartz
-
Nested Class Summary
Nested classes/interfaces inherited from class org.keycloak.models.map.common.AbstractMapProviderFactory
AbstractMapProviderFactory.MapProviderObjectType
-
Field Summary
Fields inherited from class org.keycloak.models.map.common.AbstractMapProviderFactory
CONFIG_STORAGE, LOG, modelType, PROVIDER_ID, uniqueCounter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
This is called when the server shuts down.createNew
(KeycloakSession session) Creates new instance of a provider.Returns the metadata for each configuration property supported by this factory.getId()
void
init
(Config.Scope config) Only called once when the factory is first created.boolean
void
postInit
(KeycloakSessionFactory factory) Called after all provider factories have been initializedMethods inherited from class org.keycloak.models.map.common.AbstractMapProviderFactory
create, getMapStorage, getProviderFactoryOrComponentFactory
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, getConfigProperties, onUpdate, preRemove
Methods inherited from interface org.keycloak.component.ComponentFactory
getCommonProviderConfigProperties, getTypeMetadata, onCreate, validateConfiguration
Methods inherited from interface org.keycloak.provider.ConfiguredProvider
getConfig
Methods inherited from interface org.keycloak.provider.EnvironmentDependentProviderFactory
isSupported
Methods inherited from interface org.keycloak.provider.ProviderFactory
order
-
Field Details
-
DEFAULT_TIMEOUT_MILLISECONDS
- See Also:
-
DEFAULT_VALUE
public static final long DEFAULT_VALUE- See Also:
-
-
Constructor Details
-
MapGlobalLockProviderFactory
public MapGlobalLockProviderFactory()
-
-
Method Details
-
createNew
Description copied from class:AbstractMapProviderFactory
Creates new instance of a provider.- Specified by:
createNew
in classAbstractMapProviderFactory<GlobalLockProvider,
MapLockEntity, MapLockEntity> - Returns:
- See description.
-
init
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 interfaceProviderFactory<GlobalLockProvider>
- Overrides:
init
in classAbstractMapProviderFactory<GlobalLockProvider,
MapLockEntity, MapLockEntity>
-
postInit
Description copied from interface:ProviderFactory
Called after all provider factories have been initialized- Specified by:
postInit
in interfaceProviderFactory<GlobalLockProvider>
- Overrides:
postInit
in classAbstractMapProviderFactory<GlobalLockProvider,
MapLockEntity, MapLockEntity>
-
close
public void close()Description copied from interface:ProviderFactory
This is called when the server shuts down.- Specified by:
close
in interfaceAmphibianProviderFactory<GlobalLockProvider>
- Specified by:
close
in interfaceProviderFactory<GlobalLockProvider>
-
getId
- Specified by:
getId
in interfaceProviderFactory<GlobalLockProvider>
- Overrides:
getId
in classAbstractMapProviderFactory<GlobalLockProvider,
MapLockEntity, MapLockEntity>
-
isSupported
public boolean isSupported()- Specified by:
isSupported
in interfaceEnvironmentDependentProviderFactory
- Overrides:
isSupported
in classAbstractMapProviderFactory<GlobalLockProvider,
MapLockEntity, MapLockEntity> - Returns:
true
if the provider is supported and should be available,false
otherwise
-
getHelpText
- Specified by:
getHelpText
in interfaceConfiguredProvider
-
getConfigMetadata
Description copied from interface:ProviderFactory
Returns the metadata for each configuration property supported by this factory.- Specified by:
getConfigMetadata
in interfaceProviderFactory<GlobalLockProvider>
- Returns:
- a list with the metadata for each configuration property supported by this factory
-