public interface ClusterManager extends NameResolver, LockFactory
Modifier and Type | Method and Description |
---|---|
void |
configure(ClusterConfig config)
Set a new cluster configuration.
|
Collection<ClusterNodeInformation> |
getAllNodesInformation() |
ClusteredLock |
getClusteredLock(String key)
Deprecated.
since 5.6 Use
ClusterLockService.getLockForName(String) instead. |
ClusterInformation |
getClusterInformation()
Get information about the running cluster.
|
ClusterInvariants |
getClusterInvariants()
Get all attributes of the server that must be consistent between cluster nodes.
|
long |
getClusterUptime()
Gets the amount of time that the cluster has been running.
|
<T> com.atlassian.core.task.FifoBuffer<T> |
getFifoBuffer(String name)
Get a distributed FIFO buffer
|
Map<Integer,NodeStatus> |
getNodeStatuses()
Deprecated.
since 5.5 Use
getNodeStatusMap() |
Map<ClusterNodeInformation,NodeStatus> |
getNodeStatusMap()
Gets status information from all members of the cluster.
|
@Nullable ClusterNodeInformation |
getThisNodeInformation()
Get the identity of this node in the cluster.
|
boolean |
isClustered() |
boolean |
isClusterSupported()
Check whether this Confluence distribution is capable of running in a cluster.
|
boolean |
isConfigured() |
void |
publishEvent(ConfluenceEvent event)
Publish an event as a ClusterEventWrapper to other nodes
|
void |
publishEventImmediately(ConfluenceEvent event)
Publish immediately, an event as a ClusterEventWrapper to other nodes
|
void |
reconfigure(ClusterConfig config)
Set a new cluster configuration and cycle the service
|
void |
startCluster()
Start the clustering service
|
void |
stopCluster()
Stop the clustering service
|
<T> CompletionStage<T> |
submitToKeyOwner(Callable<T> task,
String serviceName,
Object key)
Submit a task to be executed by a service given by its name on one node of the cluster that own a given key.
|
resolveName
getLock
boolean isClusterSupported()
isClustered()
in that it will return true if the code to support clustering is present,
even if this instance does not have a clustered license or a current clustering configuration.boolean isClustered()
ClusterInformation getClusterInformation()
@Deprecated ClusteredLock getClusteredLock(String key)
ClusterLockService.getLockForName(String)
instead.Lock.tryLock()
or Lock.lock()
on the returned object to
acquire the lock.<T> com.atlassian.core.task.FifoBuffer<T> getFifoBuffer(String name)
void publishEvent(ConfluenceEvent event)
This waits for any current transaction to be committed successfully before scheduling the event for publishing.
void publishEventImmediately(ConfluenceEvent event)
This is done immediately regardless of the state of any current transactions.
@Nullable ClusterNodeInformation getThisNodeInformation()
Get the identity of this node in the cluster. ClusterNodeInformation implements equals().
Collection<ClusterNodeInformation> getAllNodesInformation()
void configure(ClusterConfig config)
config
- boolean isConfigured()
configure(ClusterConfig)
has been called with a
valid configuration, otherwise false.void reconfigure(ClusterConfig config)
config
- void stopCluster()
void startCluster()
@Deprecated Map<Integer,NodeStatus> getNodeStatuses()
getNodeStatusMap()
Map<ClusterNodeInformation,NodeStatus> getNodeStatusMap()
ClusterInvariants getClusterInvariants() throws ClusterException
ClusterException
- if the invariants can not be gathered for some reason<T> CompletionStage<T> submitToKeyOwner(Callable<T> task, String serviceName, Object key)
task
- task to be executed on the node that owns the provided key, it must be Serializable
serviceName
- name of service used to execute the taskkey
- key used to determined which node is going to execute the task, it must be Serializable
long getClusterUptime()
Copyright © 2003–2020 Atlassian. All rights reserved.