Class 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 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 happened
        operationId - the doc ID for the operation
        errorCode - if it is success, transitive, or fatal
        isConditionNotMet - if error is due to condition not met
        traceMessage - 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.