Package com.atlassian.bitbucket.cluster
Interface ClusterService
public interface ClusterService
Provides access to cluster details for the instance.
-
Method Summary
Modifier and TypeMethodDescriptionConvenience method for obtaining the ID for the local node.Retrieve the current status of the individual cluster nodes.boolean
boolean
boolean
isLeader()
-
Method Details
-
getInformation
- Returns:
- details about the cluster and its
nodes
-
getNodeId
Convenience method for obtaining the ID for the local node. Calling the method is equivalent to callinggetInformation().getLocalNode().getId()
- Returns:
- the ID of the local node
-
getNodeStates
Retrieve the current status of the individual cluster nodes. The nodes returned may be incomplete; absence of a node should be considered a status ofUNKNOWN
.- Returns:
- The status of the individual nodes that were available.
- Throws:
ClusterExecutionException
- when execution on the remote nodes fails for any reason- Since:
- 8.0
-
isAvailable
boolean isAvailable()- Returns:
true
if clustering is available; otherwise,false
-
isClustered
boolean isClustered()- Returns:
true
if clustering isavailable
and at least two nodes have joined the cluster
-
isLeader
boolean isLeader()- Returns:
true
if the current node is the leader node; alsotrue
if clustering is not enabled- Since:
- 7.12
-