Class DefaultInfinispanConnectionProviderFactory
java.lang.Object
org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory
- All Implemented Interfaces:
InfinispanConnectionProviderFactory
,ProviderFactory<InfinispanConnectionProvider>
public class DefaultInfinispanConnectionProviderFactory
extends Object
implements InfinispanConnectionProviderFactory
- Author:
- Stian Thorgersen
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
This is called when the server shuts down.create
(KeycloakSession session) Optional method used to declare that a ProviderFactory has a dependency on one or more Providers.getId()
protected org.infinispan.configuration.cache.Configuration
void
init
(Config.Scope config) Only called once when the factory is first created.protected org.infinispan.manager.EmbeddedCacheManager
initContainerManaged
(org.infinispan.manager.EmbeddedCacheManager cacheManager) protected org.infinispan.manager.EmbeddedCacheManager
protected void
lazyInit
(KeycloakSession keycloakSession) void
postInit
(KeycloakSessionFactory factory) Called after all provider factories have been initializedstatic void
static <T> T
runWithReadLockOnCacheManager
(Supplier<T> task) static void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.keycloak.provider.ProviderFactory
getConfigMetadata, order
-
Field Details
-
containerManaged
protected volatile boolean containerManaged
-
-
Constructor Details
-
DefaultInfinispanConnectionProviderFactory
public DefaultInfinispanConnectionProviderFactory()
-
-
Method Details
-
create
- Specified by:
create
in interfaceProviderFactory<InfinispanConnectionProvider>
-
runWithReadLockOnCacheManager
-
runWithReadLockOnCacheManager
-
runWithWriteLockOnCacheManager
-
close
public void close()Description copied from interface:ProviderFactory
This is called when the server shuts down.- Specified by:
close
in interfaceProviderFactory<InfinispanConnectionProvider>
-
getId
- Specified by:
getId
in interfaceProviderFactory<InfinispanConnectionProvider>
-
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<InfinispanConnectionProvider>
-
postInit
Description copied from interface:ProviderFactory
Called after all provider factories have been initialized- Specified by:
postInit
in interfaceProviderFactory<InfinispanConnectionProvider>
-
lazyInit
-
initContainerManaged
protected org.infinispan.manager.EmbeddedCacheManager initContainerManaged(org.infinispan.manager.EmbeddedCacheManager cacheManager) -
initEmbedded
protected org.infinispan.manager.EmbeddedCacheManager initEmbedded() -
getKeysCacheConfig
protected org.infinispan.configuration.cache.Configuration getKeysCacheConfig() -
dependsOn
Description copied from interface:ProviderFactory
Optional method used to declare that a ProviderFactory has a dependency on one or more Providers. If a Provider is declared here, it is guaranteed that the dependenciesProviderFactory.postInit(org.keycloak.models.KeycloakSessionFactory)
method will be executed before this ProviderFactory'sProviderFactory.postInit(org.keycloak.models.KeycloakSessionFactory)
. Similarly, it's guaranteed thatProviderFactory.close()
will be called on thisProviderFactory
beforeProviderFactory.close()
is called on any of the dependent ProviderFactory implementations.- Specified by:
dependsOn
in interfaceProviderFactory<InfinispanConnectionProvider>
-