Class DistributedClusterStateUpdater

  • public class DistributedClusterStateUpdater
    extends Object
    Gives access to distributed cluster state update methods and allows code to inquire whether distributed state update is enabled.
    • Constructor Detail

      • DistributedClusterStateUpdater

        public DistributedClusterStateUpdater​(boolean useDistributedStateUpdate)
        Builds an instance with the specified behavior regarding distribution of state updates, allowing to know distributed updates are not enabled (parameter useDistributedStateUpdate is false), or when they are (parameter is true), gives access to methods and classes allowing the execution of the updates.
        useDistributedStateUpdate - when this parameter is false, only method expected to ever be called on this instance is isDistributedStateUpdate(), and it will return false.
    • Method Detail

      • doSingleStateUpdate

        public void doSingleStateUpdate​(DistributedClusterStateUpdater.MutatingCommand command,
                                 throws org.apache.zookeeper.KeeperException,
        Syntactic sugar to allow a single change to the cluster state to be made in a single call.
      • executeNodeDownStateUpdate

        public void executeNodeDownStateUpdate​(String nodeName,
      • isDistributedStateUpdate

        public boolean isDistributedStateUpdate()
        When this method returns false the legacy behavior of enqueueing cluster state update messages to Overseer should be used and no other method of this class should be called.