Class HealthInfoCache

java.lang.Object
org.elasticsearch.health.node.HealthInfoCache
All Implemented Interfaces:
ClusterStateListener

public class HealthInfoCache extends Object implements ClusterStateListener
Keeps track of several health statuses per node that can be used in health.
  • Method Details

    • create

      public static HealthInfoCache create(ClusterService clusterService)
    • updateNodeHealth

      public void updateNodeHealth(String nodeId, DiskHealthInfo diskHealthInfo)
    • clusterChanged

      public void clusterChanged(ClusterChangedEvent event)
      Description copied from interface: ClusterStateListener
      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.

      Specified by:
      clusterChanged in interface ClusterStateListener
    • getHealthInfo

      public HealthInfo getHealthInfo()
      This returns all the health info stored in this cache
      Returns:
      A HealthInfo object wrapping all health data in the cache