Package org.keycloak.cluster.infinispan
Class DatabaseAwareClusterProvider
java.lang.Object
org.keycloak.cluster.infinispan.DatabaseAwareClusterProvider
- All Implemented Interfaces:
org.keycloak.cluster.ClusterProvider,org.keycloak.provider.Provider
public class DatabaseAwareClusterProvider
extends Object
implements org.keycloak.cluster.ClusterProvider
Wraps an
InfinispanClusterProvider and additionally persists events to the database
for cross-cluster communication.- Author:
- Alexander Schwartz
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.cluster.ClusterProvider
org.keycloak.cluster.ClusterProvider.DCNotify -
Constructor Summary
ConstructorsConstructorDescriptionDatabaseAwareClusterProvider(org.keycloak.cluster.ClusterProvider delegate, org.keycloak.models.KeycloakSession session, NodeInfo nodeInfo, org.infinispan.commons.marshall.Marshaller marshaller, Duration awaitTimeout) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()<T> org.keycloak.cluster.ExecutionResult<T>executeIfNotExecuted(String taskKey, int taskTimeoutInSeconds, Callable<T> task) executeIfNotExecutedAsync(String taskKey, int taskTimeoutInSeconds, Callable task) intbooleanbooleanvoidnotify(String taskKey, Collection<? extends org.keycloak.cluster.ClusterEvent> events, boolean ignoreSender) voidnotify(String taskKey, Collection<? extends org.keycloak.cluster.ClusterEvent> events, boolean ignoreSender, org.keycloak.cluster.ClusterProvider.DCNotify dcNotify) voidvoidnotify(String taskKey, org.keycloak.cluster.ClusterEvent event, boolean ignoreSender, org.keycloak.cluster.ClusterProvider.DCNotify dcNotify) voidregisterListener(String taskKey, org.keycloak.cluster.ClusterListener task)
-
Constructor Details
-
DatabaseAwareClusterProvider
-
-
Method Details
-
getClusterStartupTime
public int getClusterStartupTime()- Specified by:
getClusterStartupTimein interfaceorg.keycloak.cluster.ClusterProvider
-
executeIfNotExecuted
public <T> org.keycloak.cluster.ExecutionResult<T> executeIfNotExecuted(String taskKey, int taskTimeoutInSeconds, Callable<T> task) - Specified by:
executeIfNotExecutedin interfaceorg.keycloak.cluster.ClusterProvider
-
isPrimaryCluster
public boolean isPrimaryCluster()- Specified by:
isPrimaryClusterin interfaceorg.keycloak.cluster.ClusterProvider
-
isPrimaryClusterSupported
public boolean isPrimaryClusterSupported()- Specified by:
isPrimaryClusterSupportedin interfaceorg.keycloak.cluster.ClusterProvider
-
executeIfNotExecutedAsync
public Future<Boolean> executeIfNotExecutedAsync(String taskKey, int taskTimeoutInSeconds, Callable task) - Specified by:
executeIfNotExecutedAsyncin interfaceorg.keycloak.cluster.ClusterProvider
-
registerListener
- Specified by:
registerListenerin interfaceorg.keycloak.cluster.ClusterProvider
-
notify
public void notify(String taskKey, org.keycloak.cluster.ClusterEvent event, boolean ignoreSender, org.keycloak.cluster.ClusterProvider.DCNotify dcNotify) - Specified by:
notifyin interfaceorg.keycloak.cluster.ClusterProvider
-
notify
- Specified by:
notifyin interfaceorg.keycloak.cluster.ClusterProvider
-
notify
public void notify(String taskKey, Collection<? extends org.keycloak.cluster.ClusterEvent> events, boolean ignoreSender, org.keycloak.cluster.ClusterProvider.DCNotify dcNotify) - Specified by:
notifyin interfaceorg.keycloak.cluster.ClusterProvider
-
notify
public void notify(String taskKey, Collection<? extends org.keycloak.cluster.ClusterEvent> events, boolean ignoreSender) - Specified by:
notifyin interfaceorg.keycloak.cluster.ClusterProvider
-
close
public void close()- Specified by:
closein interfaceorg.keycloak.provider.Provider
-