Package com.yahoo.vespa.http.client.core
Class OperationStatus
- java.lang.Object
-
- com.yahoo.vespa.http.client.core.OperationStatus
-
public final class OperationStatus extends java.lang.Object
Serialization/deserialization class for the result of a single document operation against Vespa.- Author:
- Steinar Knutsen
-
-
Field Summary
Fields Modifier and Type Field Description ErrorCode
errorCode
static java.lang.String
IS_CONDITION_NOT_MET
boolean
isConditionNotMet
java.lang.String
message
java.lang.String
operationId
java.lang.String
traceMessage
-
Constructor Summary
Constructors Constructor Description OperationStatus(java.lang.String message, java.lang.String operationId, ErrorCode errorCode, boolean isConditionNotMet, java.lang.String traceMessage)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OperationStatus
parse(java.lang.String singleLine)
Parse a single rendered OperationStatus string.java.lang.String
render()
Returns a string representing the status.
-
-
-
Field Detail
-
IS_CONDITION_NOT_MET
public static final java.lang.String IS_CONDITION_NOT_MET
- See Also:
- Constant Field Values
-
message
public final java.lang.String message
-
operationId
public final java.lang.String operationId
-
errorCode
public final ErrorCode errorCode
-
traceMessage
public final java.lang.String traceMessage
-
isConditionNotMet
public final boolean isConditionNotMet
-
-
Constructor Detail
-
OperationStatus
public OperationStatus(java.lang.String message, java.lang.String operationId, ErrorCode errorCode, boolean isConditionNotMet, java.lang.String traceMessage)
Constructor- Parameters:
message
- some human readable information what happenedoperationId
- the doc ID for the operationerrorCode
- if it is success, transitive, or fatalisConditionNotMet
- if error is due to condition not mettraceMessage
- any tracemessage
-
-
Method Detail
-
parse
public static OperationStatus parse(java.lang.String singleLine)
Parse a single rendered OperationStatus string. White space may be padded after and before the given status.- Parameters:
singleLine
- a rendered OperationStatus- Returns:
- an OperationStatus instance reflecting the input
- Throws:
java.lang.IllegalArgumentException
- if there are illegal input data characters or the status element has no corresponding value in the ErrorCode enumeration
-
render
public java.lang.String render()
Returns a string representing the status.
-
-