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
-
Method Summary
Modifier and TypeMethodDescriptioncluster()Returns the cluster this node is a member ofbooleanstatic ClusterMembershipfrom(ClusterSpec cluster, int index) static ClusterMembershipfrom(String stringValue, com.yahoo.component.Version vespaVersion, Optional<DockerImage> dockerImageRepo) static ClusterMembershipfrom(String stringValue, com.yahoo.component.Version vespaVersion, Optional<DockerImage> dockerImageRepo, ZoneEndpoint zoneEndpoint) inthashCode()intindex()Returns the index of this node within the clusterretire()Returns a copy of this which is retiredbooleanretired()Returns whether the cluster should prepare for this node to be removedstatic ClusterMembershipretiredFrom(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 Stringunretire()Returns a copy of this node which is not retiredwith(ClusterSpec newCluster)
-
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
public static ClusterMembership from(String stringValue, com.yahoo.component.Version vespaVersion, Optional<DockerImage> dockerImageRepo, ZoneEndpoint zoneEndpoint) -
from
-
retiredFrom
-