Interface ClusterStateListener

All Known Subinterfaces:
LocalNodeMasterListener, TimeoutClusterStateListener
All Known Implementing Classes:
DelayedAllocationService, GatewayService, IndicesStore, InternalClusterInfoService, InternalSnapshotsInfoService, PeerRecoverySourceService, PersistentTasksClusterService, PersistentTasksNodeService, PluginShutdownService, ResponseCollectorService, RestoreClusterStateListener, SnapshotShardsService, SystemIndexManager, SystemIndexMetadataUpgradeService, TemplateUpgradeService

public interface ClusterStateListener
A listener to be notified when a cluster state changes. The clusterChanged(org.elasticsearch.cluster.ClusterChangedEvent) method is called after the cluster state becomes visible via ClusterService.state(). See also ClusterStateApplier.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when cluster state changes.
  • Method Details

    • clusterChanged

      void clusterChanged(ClusterChangedEvent event)
      Called when cluster state changes.

      Cluster states are applied one-by-one which means they can be a performance bottleneck. Implementations of this method should therefore be fast, so please consider forking work into the background rather than doing everything inline.