Class ClusterMembership


  • public class ClusterMembership
    extends java.lang.Object
    A node's membership in a cluster. This is a value object. The format is "clusterType/clusterId/groupId/index[/exclusive][/retired][/combinedId]"
    Author:
    bratseth
    • Constructor Detail

      • ClusterMembership

        protected ClusterMembership()
    • Method Detail

      • toStringValue

        protected java.lang.String toStringValue()
      • cluster

        public ClusterSpec 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
      • unretire

        public ClusterMembership unretire()
        Returns a copy of this node which is not retired
      • stringValue

        public java.lang.String stringValue()
        Returns all the information in this as a string which can be used to construct the same ClusterMembership instance using from(java.lang.String, com.yahoo.component.Version). This string is currently stored in ZooKeeper on running instances.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • from

        public static ClusterMembership from​(java.lang.String stringValue,
                                             com.yahoo.component.Version vespaVersion)
      • from

        public static ClusterMembership from​(java.lang.String stringValue,
                                             com.yahoo.component.Version vespaVersion,
                                             java.util.Optional<DockerImage> dockerImageRepo)