Class UpdateResponse

All Implemented Interfaces:
WriteResponse, Writeable, org.elasticsearch.common.util.concurrent.RefCounted, StatusToXContentObject, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject

public class UpdateResponse
extends DocWriteResponse
  • Constructor Details

    • UpdateResponse

      public UpdateResponse​(ShardId shardId, StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException
    • UpdateResponse

      public UpdateResponse​(StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException
    • UpdateResponse

      public UpdateResponse​(ShardId shardId, java.lang.String type, java.lang.String id, long seqNo, long primaryTerm, long version, DocWriteResponse.Result result)
      Constructor to be used when a update didn't translate in a write. For example: update script with operation set to none
    • UpdateResponse

      public UpdateResponse​(ReplicationResponse.ShardInfo shardInfo, ShardId shardId, java.lang.String type, java.lang.String id, long seqNo, long primaryTerm, long version, DocWriteResponse.Result result)
  • Method Details

    • setGetResult

      public void setGetResult​(GetResult getResult)
    • getGetResult

      public GetResult getGetResult()
    • status

      public RestStatus status()
      Description copied from class: DocWriteResponse
      returns the rest status for this response (based on ReplicationResponse.ShardInfo.status()
      Specified by:
      status in interface StatusToXContentObject
      Overrides:
      status in class DocWriteResponse
    • writeThin

      public void writeThin​(StreamOutput out) throws java.io.IOException
      Overrides:
      writeThin in class DocWriteResponse
      Throws:
      java.io.IOException
    • writeTo

      public void writeTo​(StreamOutput out) throws java.io.IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Overrides:
      writeTo in class DocWriteResponse
      Throws:
      java.io.IOException
    • innerToXContent

      public org.elasticsearch.common.xcontent.XContentBuilder innerToXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException
      Overrides:
      innerToXContent in class DocWriteResponse
      Throws:
      java.io.IOException
    • toString

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

      public static UpdateResponse fromXContent​(org.elasticsearch.common.xcontent.XContentParser parser) throws java.io.IOException
      Throws:
      java.io.IOException
    • parseXContentFields

      public static void parseXContentFields​(org.elasticsearch.common.xcontent.XContentParser parser, UpdateResponse.Builder context) throws java.io.IOException
      Parse the current token and update the parsing context appropriately.
      Throws:
      java.io.IOException