Package org.keycloak.cluster.infinispan
Class InfinispanClusterProvider
- java.lang.Object
-
- org.keycloak.cluster.infinispan.InfinispanClusterProvider
-
- All Implemented Interfaces:
ClusterProvider,Provider
public class InfinispanClusterProvider extends Object implements ClusterProvider
- Author:
- Marek Posolda
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.cluster.ClusterProvider
ClusterProvider.DCNotify
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLUSTER_STARTUP_TIME_KEYprotected static org.jboss.logging.Loggerlogger
-
Constructor Summary
Constructors Constructor Description InfinispanClusterProvider(int clusterStartupTime, String myAddress, org.keycloak.cluster.infinispan.CrossDCAwareCacheFactory crossDCAwareCacheFactory, InfinispanNotificationsManager notificationsManager, ExecutorService localExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()<T> ExecutionResult<T>executeIfNotExecuted(String taskKey, int taskTimeoutInSeconds, Callable<T> task)Future<Boolean>executeIfNotExecutedAsync(String taskKey, int taskTimeoutInSeconds, Callable task)intgetClusterStartupTime()voidnotify(String taskKey, ClusterEvent event, boolean ignoreSender, ClusterProvider.DCNotify dcNotify)voidregisterListener(String taskKey, ClusterListener task)
-
-
-
Field Detail
-
logger
protected static final org.jboss.logging.Logger logger
-
CLUSTER_STARTUP_TIME_KEY
public static final String CLUSTER_STARTUP_TIME_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InfinispanClusterProvider
public InfinispanClusterProvider(int clusterStartupTime, String myAddress, org.keycloak.cluster.infinispan.CrossDCAwareCacheFactory crossDCAwareCacheFactory, InfinispanNotificationsManager notificationsManager, ExecutorService localExecutor)
-
-
Method Detail
-
getClusterStartupTime
public int getClusterStartupTime()
- Specified by:
getClusterStartupTimein interfaceClusterProvider
-
executeIfNotExecuted
public <T> ExecutionResult<T> executeIfNotExecuted(String taskKey, int taskTimeoutInSeconds, Callable<T> task)
- Specified by:
executeIfNotExecutedin interfaceClusterProvider
-
executeIfNotExecutedAsync
public Future<Boolean> executeIfNotExecutedAsync(String taskKey, int taskTimeoutInSeconds, Callable task)
- Specified by:
executeIfNotExecutedAsyncin interfaceClusterProvider
-
registerListener
public void registerListener(String taskKey, ClusterListener task)
- Specified by:
registerListenerin interfaceClusterProvider
-
notify
public void notify(String taskKey, ClusterEvent event, boolean ignoreSender, ClusterProvider.DCNotify dcNotify)
- Specified by:
notifyin interfaceClusterProvider
-
-