Class DefaultInfinispanConnectionProviderFactory
java.lang.Object
org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory
- All Implemented Interfaces:
InfinispanConnectionProviderFactory,ProviderEventListener,ProviderFactory<InfinispanConnectionProvider>,ServerInfoAwareProviderFactory
public class DefaultInfinispanConnectionProviderFactory
extends Object
implements InfinispanConnectionProviderFactory, ProviderEventListener, ServerInfoAwareProviderFactory
- Author:
- Stian Thorgersen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()This is called when the server shuts down.create(KeycloakSession session) protected org.infinispan.manager.EmbeddedCacheManagerprotected org.infinispan.client.hotrod.RemoteCacheManagercreateRemoteCacheManager(KeycloakSession session) Optional method used to declare that a ProviderFactory has a dependency on one or more Providers.protected org.infinispan.configuration.cache.ConfigurationDeprecated, for removal: This API element is subject to removal in a future version.getId()protected org.infinispan.configuration.cache.ConfigurationDeprecated, for removal: This API element is subject to removal in a future version.not used anymoreReturn actual info about the provider.voidinit(Config.Scope config) Only called once when the factory is first created.protected org.infinispan.manager.EmbeddedCacheManagerinitContainerManaged(org.infinispan.manager.EmbeddedCacheManager cacheManager) Deprecated, for removal: This API element is subject to removal in a future version.not invoked anymore.protected org.infinispan.manager.EmbeddedCacheManagerDeprecated, for removal: This API element is subject to removal in a future version.not used anymore.booleanChecks if the cluster health check is supported.booleanDetects network split in the cluster.protected InfinispanConnectionProviderlazyInit(KeycloakSession keycloakSession) voidonEvent(ProviderEvent event) voidpostInit(KeycloakSessionFactory factory) Called after all provider factories have been initializedstatic voidstatic voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.provider.ProviderFactory
getConfigMetadata, order
-
Constructor Details
-
DefaultInfinispanConnectionProviderFactory
public DefaultInfinispanConnectionProviderFactory()
-
-
Method Details
-
create
- Specified by:
createin interfaceProviderFactory<InfinispanConnectionProvider>
-
runWithReadLockOnCacheManager
-
runWithWriteLockOnCacheManager
-
close
public void close()Description copied from interface:ProviderFactoryThis is called when the server shuts down.- Specified by:
closein interfaceProviderFactory<InfinispanConnectionProvider>
-
getId
- Specified by:
getIdin interfaceProviderFactory<InfinispanConnectionProvider>
-
init
Description copied from interface:ProviderFactoryOnly called once when the factory is first created.- Specified by:
initin interfaceProviderFactory<InfinispanConnectionProvider>
-
postInit
Description copied from interface:ProviderFactoryCalled after all provider factories have been initialized- Specified by:
postInitin interfaceProviderFactory<InfinispanConnectionProvider>
-
lazyInit
-
createEmbeddedCacheManager
protected org.infinispan.manager.EmbeddedCacheManager createEmbeddedCacheManager(KeycloakSession session) -
createRemoteCacheManager
protected org.infinispan.client.hotrod.RemoteCacheManager createRemoteCacheManager(KeycloakSession session) -
initContainerManaged
@Deprecated(since="26.0", forRemoval=true) protected org.infinispan.manager.EmbeddedCacheManager initContainerManaged(org.infinispan.manager.EmbeddedCacheManager cacheManager) Deprecated, for removal: This API element is subject to removal in a future version.not invoked anymore. OverwritecreateEmbeddedCacheManager(KeycloakSession). -
initEmbedded
@Deprecated(since="26.3", forRemoval=true) protected org.infinispan.manager.EmbeddedCacheManager initEmbedded()Deprecated, for removal: This API element is subject to removal in a future version.not used anymore. OverwritecreateEmbeddedCacheManager(KeycloakSession)if you want to create a customEmbeddedCacheManager. -
getKeysCacheConfig
@Deprecated(since="26.3", forRemoval=true) protected org.infinispan.configuration.cache.Configuration getKeysCacheConfig()Deprecated, for removal: This API element is subject to removal in a future version.not used anymore -
getCrlCacheConfig
@Deprecated(since="26.3", forRemoval=true) protected org.infinispan.configuration.cache.Configuration getCrlCacheConfig()Deprecated, for removal: This API element is subject to removal in a future version. -
dependsOn
Description copied from interface:ProviderFactoryOptional 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 thisProviderFactorybeforeProviderFactory.close()is called on any of the dependent ProviderFactory implementations.- Specified by:
dependsOnin interfaceProviderFactory<InfinispanConnectionProvider>
-
onEvent
- Specified by:
onEventin interfaceProviderEventListener
-
getOperationalInfo
Description copied from interface:ServerInfoAwareProviderFactoryReturn actual info about the provider. This info contains information about provider's configuration and operational conditions (eg. errors in connection to remote systems etc) which is shown on "Server Info" page then.- Specified by:
getOperationalInfoin interfaceServerInfoAwareProviderFactory- Returns:
- Map with keys describing value and relevant values itself
-
isClusterHealthy
public boolean isClusterHealthy()Description copied from interface:InfinispanConnectionProviderFactoryDetects network split in the cluster.If a possible network split is detected and this node does not belong to the winning partition, this method will return
false, and should not continue handling requests, to keep data safety.- Specified by:
isClusterHealthyin interfaceInfinispanConnectionProviderFactory- Returns:
trueif the cluster is healthy and this node can continue processing requests. Whenfalse, this node must reject any work.
-
isClusterHealthSupported
public boolean isClusterHealthSupported()Description copied from interface:InfinispanConnectionProviderFactoryChecks if the cluster health check is supported.Not all JGroups configurations support discovering network splits and this method signals if the current in use configuration can detect those.
- Specified by:
isClusterHealthSupportedin interfaceInfinispanConnectionProviderFactory- Returns:
trueif the cluster health check is supported.
-
CacheConfigurator.getCrlCacheConfig()