Package org.keycloak.cluster.infinispan
Class DatabaseAwareClusterProviderFactory
java.lang.Object
org.keycloak.cluster.infinispan.InfinispanClusterProviderFactory
org.keycloak.cluster.infinispan.DatabaseAwareClusterProviderFactory
- All Implemented Interfaces:
ClusterProviderFactory,EnvironmentDependentProviderFactory,ProviderFactory<ClusterProvider>
This implementation sends information to other clusters via a database table.
- Author:
- Alexander Schwartz
-
Nested Class Summary
Nested classes/interfaces inherited from class org.keycloak.cluster.infinispan.InfinispanClusterProviderFactory
InfinispanClusterProviderFactory.ViewChangeListener -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()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.Returns the metadata for each configuration property supported by this factory.getId()voidinit(Config.Scope config) Only called once when the factory is first created.booleanisSupported(Config.Scope config) Check if the provider is supported and should be available based on the provider configuration.voidpostInit(KeycloakSessionFactory factory) Called after all provider factories have been initializedMethods inherited from class org.keycloak.cluster.infinispan.InfinispanClusterProviderFactory
initClusterStartupTimeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.provider.ProviderFactory
order
-
Field Details
-
logger
protected static final org.jboss.logging.Logger logger
-
-
Constructor Details
-
DatabaseAwareClusterProviderFactory
public DatabaseAwareClusterProviderFactory()
-
-
Method Details
-
create
- Specified by:
createin interfaceProviderFactory<ClusterProvider>- Overrides:
createin classInfinispanClusterProviderFactory
-
init
Description copied from interface:ProviderFactoryOnly called once when the factory is first created.- Specified by:
initin interfaceProviderFactory<ClusterProvider>- Overrides:
initin classInfinispanClusterProviderFactory
-
getConfigMetadata
Description copied from interface:ProviderFactoryReturns the metadata for each configuration property supported by this factory.- Returns:
- a list with the metadata for each configuration property supported by this factory
-
postInit
Description copied from interface:ProviderFactoryCalled after all provider factories have been initialized- Specified by:
postInitin interfaceProviderFactory<ClusterProvider>- Overrides:
postInitin classInfinispanClusterProviderFactory
-
close
public void close()Description copied from interface:ProviderFactoryThis is called when the server shuts down.- Specified by:
closein interfaceProviderFactory<ClusterProvider>- Overrides:
closein classInfinispanClusterProviderFactory
-
getId
- Specified by:
getIdin interfaceProviderFactory<ClusterProvider>- Overrides:
getIdin classInfinispanClusterProviderFactory
-
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. -
isSupported
Description copied from interface:EnvironmentDependentProviderFactoryCheck if the provider is supported and should be available based on the provider configuration.- Specified by:
isSupportedin interfaceEnvironmentDependentProviderFactory- Overrides:
isSupportedin classInfinispanClusterProviderFactory- Parameters:
config- the provider configuration- Returns:
trueif the provider is supported. Otherwise,false.
-