Class BulkItemResponse.Failure

    • Constructor Detail

      • Failure

        public Failure​(java.lang.String index,
                       java.lang.String type,
                       java.lang.String id,
                       java.lang.Exception cause)
        For write failures before operation was assigned a sequence number. use @{link Failure(String, String, String, Exception, long)} to record operation sequence no with failure
      • Failure

        public Failure​(java.lang.String index,
                       java.lang.String type,
                       java.lang.String id,
                       java.lang.Exception cause,
                       boolean aborted)
      • Failure

        public Failure​(java.lang.String index,
                       java.lang.String type,
                       java.lang.String id,
                       java.lang.Exception cause,
                       RestStatus status)
      • Failure

        public Failure​(java.lang.String index,
                       java.lang.String type,
                       java.lang.String id,
                       java.lang.Exception cause,
                       long seqNo)
        For write failures after operation was assigned a sequence number.
      • Failure

        public Failure​(java.lang.String index,
                       java.lang.String type,
                       java.lang.String id,
                       java.lang.Exception cause,
                       RestStatus status,
                       long seqNo,
                       boolean aborted)
      • Failure

        public Failure​(StreamInput in)
                throws java.io.IOException
        Read from a stream.
        Throws:
        java.io.IOException
    • Method Detail

      • getIndex

        public java.lang.String getIndex()
        The index name of the action.
      • getType

        public java.lang.String getType()
        The type of the action.
      • getId

        public java.lang.String getId()
        The id of the action.
      • getMessage

        public java.lang.String getMessage()
        The failure message.
      • getStatus

        public RestStatus getStatus()
        The rest status.
      • getCause

        public java.lang.Exception getCause()
        The actual cause of the failure.
      • getSeqNo

        public long getSeqNo()
        The operation sequence number generated by primary NOTE: SequenceNumbers.UNASSIGNED_SEQ_NO indicates sequence number was not generated by primary
      • isAborted

        public boolean isAborted()
        Whether this failure is the result of an abort. If true, the request to which this failure relates should never be retried, regardless of the cause.
        See Also:
        BulkItemRequest.abort(String, Exception)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object