Interface Discovery

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable, LifecycleComponent, Releasable
    All Known Implementing Classes:
    SingleNodeDiscovery, ZenDiscovery

    public interface Discovery
    extends LifecycleComponent
    A pluggable module allowing to implement discovery of other nodes, publishing of the cluster state to all nodes, electing a master of the cluster that raises cluster state change events.
    • Method Detail

      • publish

        void publish​(ClusterChangedEvent clusterChangedEvent,
                     Discovery.AckListener ackListener)
        Publish all the changes to the cluster from the master (can be called just by the master). The publish process should apply this state to the master as well! The Discovery.AckListener allows to keep track of the ack received from nodes, and verify whether they updated their own cluster state or not. The method is guaranteed to throw a Discovery.FailedToCommitClusterStateException if the change is not committed and should be rejected. Any other exception signals the something wrong happened but the change is committed.
      • startInitialJoin

        void startInitialJoin()
        Triggers the first join cycle