Package com.atlassian.bitbucket.cluster
Interface ClusterNode
public interface ClusterNode
Describes a single node in a cluster.
-
Method Summary
Modifier and TypeMethodDescriptiongetId()Retrieves a cluster-wide unique identifier for this node.getName()A long living cluster name that is defined by setting the system propertycluster.node.namegetVmId()Retrieves a unique identifier for this node that remains stable while the node is running.booleanbooleanisLocal()
-
Method Details
-
getAddress
- Returns:
- the complete socket address, comprised of hostname and port, for the node
-
getAvailabilityZone
- Returns:
- the availability zone for the node, or
emptyif the availability zone information is not known. - Since:
- 8.11
-
getBuildVersion
- Returns:
- the build version of this node. Since 7.9, it is possible to have cluster nodes at different versions during rolling upgrade.
- Since:
- 7.9
-
getId
Retrieves a cluster-wide unique identifier for this node.Warning: Plugins should make no assumptions about this ID. That includes:
- How long it is
- What characters it contains
- Whether it will be consistent across restarts. Don't persist long-term data against these IDs
- Returns:
- a cluster-wide unique identifier for this node
-
getVmId
Retrieves a unique identifier for this node that remains stable while the node is running.The value is guaranteed to be unique within the cluster. Unlike the ordinary
identifier, if the node leaves and joins the cluster, this value remains the same.- Returns:
- a cluster-wide unique identifier for this node that remains stable while the node is running
- Since:
- 4.8
-
isFullyStarted
boolean isFullyStarted()- Returns:
trueif this node has fully started up;falseotherwise- Since:
- 4.8
-
isLocal
boolean isLocal()- Returns:
trueif this is thelocal node; otherwise,falsefor remote nodes
-
getName
A long living cluster name that is defined by setting the system propertycluster.node.name- Returns:
- The value from the system property named above otherwise an empty string if the property is not set.
-