public interface ClusterProvider extends Provider
| Modifier and Type | Field and Description |
|---|---|
static String |
ALL
Special value to be used with
registerListener(java.lang.String, org.keycloak.cluster.ClusterListener) to specify that particular listener will be always triggered for all notifications
with any key. |
| Modifier and Type | Method and Description |
|---|---|
<T> ExecutionResult<T> |
executeIfNotExecuted(String taskKey,
int taskTimeoutInSeconds,
Callable<T> task)
Execute given task just if it's not already in progress (either on this or any other cluster node).
|
int |
getClusterStartupTime()
Same value for all cluster nodes.
|
void |
notify(String taskKey,
ClusterEvent event,
boolean ignoreSender)
Notify registered listeners on all cluster nodes.
|
void |
registerListener(String taskKey,
ClusterListener task)
Register task (listener) under given key.
|
static final String ALL
registerListener(java.lang.String, org.keycloak.cluster.ClusterListener) to specify that particular listener will be always triggered for all notifications
with any key.int getClusterStartupTime()
<T> ExecutionResult<T> executeIfNotExecuted(String taskKey, int taskTimeoutInSeconds, Callable<T> task)
T - taskKey - taskTimeoutInSeconds - timeout for given task. If there is existing task in progress for longer time, it's considered outdated so we will start our task.task - void registerListener(String taskKey, ClusterListener task)
ALL as the taskKey, then listener will be always triggered for any value put into the cache.taskKey - task - void notify(String taskKey, ClusterEvent event, boolean ignoreSender)
ALL key (those are always executed)taskKey - event - ignoreSender - if true, then sender node itself won't receive the notificationCopyright © 2016 JBoss by Red Hat. All rights reserved.