Package com.yahoo.vespa.http.client.core
Class OperationStatus
- java.lang.Object
-
- com.yahoo.vespa.http.client.core.OperationStatus
-
public final class OperationStatus extends 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 String
IS_CONDITION_NOT_MET
boolean
isConditionNotMet
String
message
String
operationId
String
traceMessage
-
Constructor Summary
Constructors Constructor Description OperationStatus(String message, String operationId, ErrorCode errorCode, boolean isConditionNotMet, String traceMessage)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OperationStatus
parse(String singleLine)
Parse a single rendered OperationStatus string.String
render()
Returns a string representing the status.
-
-
-
Field Detail
-
IS_CONDITION_NOT_MET
public static final String IS_CONDITION_NOT_MET
- See Also:
- Constant Field Values
-
message
public final String message
-
operationId
public final String operationId
-
errorCode
public final ErrorCode errorCode
-
traceMessage
public final String traceMessage
-
isConditionNotMet
public final boolean isConditionNotMet
-
-
Constructor Detail
-
OperationStatus
public OperationStatus(String message, String operationId, ErrorCode errorCode, boolean isConditionNotMet, 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(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:
IllegalArgumentException
- if there are illegal input data characters or the status element has no corresponding value in the ErrorCode enumeration
-
render
public String render()
Returns a string representing the status.
-
-