Class ClusterState

    • Method Detail

      • version

        public long version()
      • getVersion

        public long getVersion()
      • stateUUID

        public java.lang.String stateUUID()
        This stateUUID is automatically generated for for each version of cluster state. It is used to make sure that we are applying diffs to the right previous state.
      • getMetaData

        public MetaData getMetaData()
      • getMinimumMasterNodesOnPublishingMaster

        public int getMinimumMasterNodesOnPublishingMaster()
        The node-level `discovery.zen.minimum_master_nodes` setting on the master node that published this cluster state, for use in rolling upgrades from 6.x to 7.x. Once all the 6.x master-eligible nodes have left the cluster, the 7.x nodes use this value to determine how many master-eligible nodes must be discovered before the cluster can be bootstrapped. Note that this method returns the node-level value of this setting, and ignores any cluster-level override that was set via the API. Callers are expected to combine this value with any value set in the cluster-level settings. This should be removed once we no longer need support for Version.V_6_7_0.
      • wasReadFromDiff

        public boolean wasReadFromDiff()
      • getRoutingNodes

        public RoutingNodes getRoutingNodes()
        Returns a built (on demand) routing nodes view of the routing table.
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • supersedes

        public boolean supersedes​(ClusterState other)
        a cluster state supersedes another state if they are from the same master and the version of this state is higher than that of the other state.

        In essence that means that all the changes from the other cluster state are also reflected by the current one