Package org.elasticsearch.client
Class NodesResponseHeader
- java.lang.Object
-
- org.elasticsearch.client.NodesResponseHeader
-
public final class NodesResponseHeader extends java.lang.ObjectA utility class to parse the Nodes Header returned byRestActions.buildNodesHeader(XContentBuilder, ToXContent.Params, BaseNodesResponse).
-
-
Field Summary
Fields Modifier and Type Field Description static ParseFieldFAILEDstatic ParseFieldFAILURESstatic ConstructingObjectParser<NodesResponseHeader,java.lang.Void>PARSERstatic ParseFieldSUCCESSFULstatic ParseFieldTOTAL
-
Constructor Summary
Constructors Constructor Description NodesResponseHeader(int total, int successful, int failed, java.util.List<ElasticsearchException> failures)
-
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)static NodesResponseHeaderfromXContent(XContentParser parser, java.lang.Void context)intgetFailed()the number of nodes that the operation has failed onjava.util.List<ElasticsearchException>getFailures()Get the failed node exceptions.intgetSuccessful()the number of nodes that the operation was successful onintgetTotal()the total number of nodes that the operation was carried onbooleanhasFailures()Determine if there are any node failures infailures.inthashCode()
-
-
-
Field Detail
-
TOTAL
public static final ParseField TOTAL
-
SUCCESSFUL
public static final ParseField SUCCESSFUL
-
FAILED
public static final ParseField FAILED
-
FAILURES
public static final ParseField FAILURES
-
PARSER
public static final ConstructingObjectParser<NodesResponseHeader,java.lang.Void> PARSER
-
-
Constructor Detail
-
NodesResponseHeader
public NodesResponseHeader(int total, int successful, int failed, @Nullable java.util.List<ElasticsearchException> failures)
-
-
Method Detail
-
fromXContent
public static NodesResponseHeader fromXContent(XContentParser parser, java.lang.Void context) throws java.io.IOException
- Throws:
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<ElasticsearchException> getFailures()
Get the failed node exceptions.- Returns:
- Never
null. Can be empty.
-
hasFailures
public boolean hasFailures()
Determine if there are any node failures infailures.- Returns:
trueiffailurescontains at least 1 exception.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-