Class ClusterStateHealth

org.elasticsearch.cluster.health.ClusterStateHealth
All Implemented Interfaces:
<ClusterIndexHealth>, Writeable

public final class ClusterStateHealth extends implements <ClusterIndexHealth>, Writeable
  • Constructor Details

    • ClusterStateHealth

      public ClusterStateHealth(ClusterState clusterState)
      Creates a new ClusterStateHealth instance considering the current cluster state and all indices in the cluster.
      Parameters:
      clusterState - The current cluster state. Must not be null.
    • ClusterStateHealth

      public ClusterStateHealth(ClusterState clusterState, [] concreteIndices)
      Creates a new ClusterStateHealth instance considering the current cluster state and the provided index names.
      Parameters:
      clusterState - The current cluster state. Must not be null.
      concreteIndices - An array of index names to consider. Must not be null but may be empty.
    • ClusterStateHealth

      public ClusterStateHealth(StreamInput in) throws
      Throws:
    • ClusterStateHealth

      public ClusterStateHealth(int activePrimaryShards, int activeShards, int relocatingShards, int initializingShards, int unassignedShards, int numberOfNodes, int numberOfDataNodes, double activeShardsPercent, ClusterHealthStatus status, <,​ClusterIndexHealth> indices)
      For ClusterHealthResponse's XContent Parser
  • Method Details

    • getActiveShards

      public int getActiveShards()
    • getRelocatingShards

      public int getRelocatingShards()
    • getActivePrimaryShards

      public int getActivePrimaryShards()
    • getInitializingShards

      public int getInitializingShards()
    • getUnassignedShards

      public int getUnassignedShards()
    • getNumberOfNodes

      public int getNumberOfNodes()
    • getNumberOfDataNodes

      public int getNumberOfDataNodes()
    • getStatus

      public ClusterHealthStatus getStatus()
    • getIndices

      public <,​ClusterIndexHealth> getIndices()
    • getActiveShardsPercent

      public double getActiveShardsPercent()
    • iterator

      public <ClusterIndexHealth> iterator()
      Specified by:
       in interface <ClusterIndexHealth>
    • writeTo

      public void writeTo(StreamOutput out) throws
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
    • toString

      public  toString()
      Overrides:
       in class 
    • equals

      public boolean equals( o)
      Overrides:
       in class 
    • hashCode

      public int hashCode()
      Overrides:
       in class