Class OperationStatus


  • public final class OperationStatus
    extends Object
    Serialization/deserialization class for the result of a single document operation against Vespa.
    Author:
    Steinar Knutsen
    • Field Detail

      • 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 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​(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.