类 NodesResponseHeader

java.lang.Object
org.easysearch.client.NodesResponseHeader

public final class NodesResponseHeader
extends java.lang.Object
A utility class to parse the Nodes Header returned by RestActions.buildNodesHeader(XContentBuilder, ToXContent.Params, BaseNodesResponse).
  • 字段概要

    字段
    修饰符和类型 字段 说明
    static org.easysearch.common.ParseField FAILED  
    static org.easysearch.common.ParseField FAILURES  
    static org.easysearch.common.xcontent.ConstructingObjectParser<NodesResponseHeader,​java.lang.Void> PARSER  
    static org.easysearch.common.ParseField SUCCESSFUL  
    static org.easysearch.common.ParseField TOTAL  
  • 构造器概要

    构造器
    构造器 说明
    NodesResponseHeader​(int total, int successful, int failed, java.util.List<org.easysearch.EasysearchException> failures)  
  • 方法概要

    修饰符和类型 方法 说明
    boolean equals​(java.lang.Object o)  
    static NodesResponseHeader fromXContent​(org.easysearch.common.xcontent.XContentParser parser, java.lang.Void context)  
    int getFailed()
    the number of nodes that the operation has failed on
    java.util.List<org.easysearch.EasysearchException> getFailures()
    Get the failed node exceptions.
    int getSuccessful()
    the number of nodes that the operation was successful on
    int getTotal()
    the total number of nodes that the operation was carried on
    boolean hasFailures()
    Determine if there are any node failures in failures.
    int hashCode()  

    从类继承的方法 java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • TOTAL

      public static final org.easysearch.common.ParseField TOTAL
    • SUCCESSFUL

      public static final org.easysearch.common.ParseField SUCCESSFUL
    • FAILED

      public static final org.easysearch.common.ParseField FAILED
    • FAILURES

      public static final org.easysearch.common.ParseField FAILURES
    • PARSER

      public static final org.easysearch.common.xcontent.ConstructingObjectParser<NodesResponseHeader,​java.lang.Void> PARSER
  • 构造器详细资料

    • NodesResponseHeader

      public NodesResponseHeader​(int total, int successful, int failed, @Nullable java.util.List<org.easysearch.EasysearchException> failures)
  • 方法详细资料

    • fromXContent

      public static NodesResponseHeader fromXContent​(org.easysearch.common.xcontent.XContentParser parser, java.lang.Void context) throws java.io.IOException
      抛出:
      java.io.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 java.util.List<org.easysearch.EasysearchException> getFailures()
      Get the failed node exceptions.
      返回:
      Never null. Can be empty.
    • hasFailures

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

      public boolean equals​(java.lang.Object o)
      覆盖:
      equals 在类中 java.lang.Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 java.lang.Object