Class NodesResponseHeader

java.lang.Object
org.elasticsearch.client.NodesResponseHeader

public final class NodesResponseHeader extends Object
A utility class to parse the Nodes Header returned by RestActions.buildNodesHeader(XContentBuilder, ToXContent.Params, BaseNodesResponse).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.elasticsearch.xcontent.ParseField
     
    static final org.elasticsearch.xcontent.ParseField
     
    static final org.elasticsearch.xcontent.ConstructingObjectParser<NodesResponseHeader,Void>
     
    static final org.elasticsearch.xcontent.ParseField
     
    static final org.elasticsearch.xcontent.ParseField
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    NodesResponseHeader(int total, int successful, int failed, List<org.elasticsearch.ElasticsearchException> failures)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    fromXContent(org.elasticsearch.xcontent.XContentParser parser, Void context)
     
    int
    the number of nodes that the operation has failed on
    List<org.elasticsearch.ElasticsearchException>
    Get the failed node exceptions.
    int
    the number of nodes that the operation was successful on
    int
    the total number of nodes that the operation was carried on
    boolean
    Determine if there are any node failures in failures.
    int
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • TOTAL

      public static final org.elasticsearch.xcontent.ParseField TOTAL
    • SUCCESSFUL

      public static final org.elasticsearch.xcontent.ParseField SUCCESSFUL
    • FAILED

      public static final org.elasticsearch.xcontent.ParseField FAILED
    • FAILURES

      public static final org.elasticsearch.xcontent.ParseField FAILURES
    • PARSER

      public static final org.elasticsearch.xcontent.ConstructingObjectParser<NodesResponseHeader,Void> PARSER
  • Constructor Details

    • NodesResponseHeader

      public NodesResponseHeader(int total, int successful, int failed, @Nullable List<org.elasticsearch.ElasticsearchException> failures)
  • Method Details

    • fromXContent

      public static NodesResponseHeader fromXContent(org.elasticsearch.xcontent.XContentParser parser, Void context) throws IOException
      Throws:
      IOException
    • getTotal

      public int getTotal()
      the total number of nodes that the operation was carried on
    • getFailed

      public int getFailed()
      the number of nodes that the operation has failed on
    • getSuccessful

      public int getSuccessful()
      the number of nodes that the operation was successful on
    • getFailures

      public List<org.elasticsearch.ElasticsearchException> getFailures()
      Get the failed node exceptions.
      Returns:
      Never null. Can be empty.
    • hasFailures

      public boolean hasFailures()
      Determine if there are any node failures in failures.
      Returns:
      true if failures contains at least 1 exception.
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object