Package com.yahoo.config.provision
Class ClusterMembership
java.lang.Object
com.yahoo.config.provision.ClusterMembership
A node's membership in a cluster. This is a value object.
The format is "clusterType/clusterId/groupId/index[/exclusive][/retired][/stateful][/combinedId]"
- Author:
- bratseth
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncluster()
Returns the cluster this node is a member ofboolean
static ClusterMembership
from
(ClusterSpec cluster, int index) static ClusterMembership
from
(String stringValue, com.yahoo.component.Version vespaVersion, Optional<DockerImage> dockerImageRepo) int
hashCode()
int
index()
Returns the index of this node within the clusterretire()
Returns a copy of this which is retiredboolean
retired()
Returns whether the cluster should prepare for this node to be removedstatic ClusterMembership
retiredFrom
(ClusterSpec cluster, int index) Returns all the information in this as a string which can be used to construct the same ClusterMembership instance usingfrom(java.lang.String, com.yahoo.component.Version, java.util.Optional<com.yahoo.config.provision.DockerImage>)
.toString()
protected String
unretire()
Returns a copy of this node which is not retiredwith
(ClusterSpec newCluster)
-
Constructor Details
-
ClusterMembership
protected ClusterMembership()
-
-
Method Details
-
toStringValue
-
cluster
Returns the cluster this node is a member of -
index
public int index()Returns the index of this node within the cluster -
retired
public boolean retired()Returns whether the cluster should prepare for this node to be removed -
retire
Returns a copy of this which is retired -
unretire
Returns a copy of this node which is not retired -
with
-
stringValue
Returns all the information in this as a string which can be used to construct the same ClusterMembership instance usingfrom(java.lang.String, com.yahoo.component.Version, java.util.Optional<com.yahoo.config.provision.DockerImage>)
. This string is currently stored in ZooKeeper on running instances. -
equals
-
hashCode
public int hashCode() -
toString
-
from
public static ClusterMembership from(String stringValue, com.yahoo.component.Version vespaVersion, Optional<DockerImage> dockerImageRepo) -
from
-
retiredFrom
-