Package org.elasticsearch.action.update
Class UpdateResponse
java.lang.Object
- All Implemented Interfaces:
WriteResponse,Writeable,StatusToXContentObject,ToXContent,ToXContentObject
public class UpdateResponse extends DocWriteResponse
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUpdateResponse.BuilderBuilder class forUpdateResponse.Nested classes/interfaces inherited from class org.elasticsearch.action.DocWriteResponse
DocWriteResponse.ResultNested classes/interfaces inherited from class org.elasticsearch.action.support.replication.ReplicationResponse
ReplicationResponse.ShardInfoNested classes/interfaces inherited from class org.elasticsearch.transport.TransportResponse
TransportResponse.EmptyNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
-
Constructor Summary
Constructors Constructor Description UpdateResponse(ReplicationResponse.ShardInfo shardInfo, ShardId shardId, java.lang.String type, java.lang.String id, long seqNo, long primaryTerm, long version, DocWriteResponse.Result result)UpdateResponse(StreamInput in)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. -
Method Summary
Modifier and Type Method Description static UpdateResponsefromXContent(XContentParser parser)GetResultgetGetResult()XContentBuilderinnerToXContent(XContentBuilder builder, ToXContent.Params params)static voidparseXContentFields(XContentParser parser, UpdateResponse.Builder context)Parse the current token and update the parsing context appropriately.voidsetGetResult(GetResult getResult)RestStatusstatus()returns the rest status for this response (based onReplicationResponse.ShardInfo.status()java.lang.StringtoString()voidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.DocWriteResponse
forcedRefresh, getId, getIndex, getLocation, getPrimaryTerm, getResult, getSeqNo, getShardId, getType, getVersion, parseInnerToXContent, setForcedRefresh, toXContentMethods inherited from class org.elasticsearch.action.support.replication.ReplicationResponse
getShardInfo, setShardInfoMethods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
-
Constructor Details
-
UpdateResponse
- 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
-
getGetResult
-
status
Description copied from class:DocWriteResponsereturns the rest status for this response (based onReplicationResponse.ShardInfo.status()- Specified by:
statusin interfaceStatusToXContentObject- Overrides:
statusin classDocWriteResponse
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classDocWriteResponse- Throws:
java.io.IOException
-
innerToXContent
public XContentBuilder innerToXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Overrides:
innerToXContentin classDocWriteResponse- Throws:
java.io.IOException
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
fromXContent
- Throws:
java.io.IOException
-
parseXContentFields
public static void parseXContentFields(XContentParser parser, UpdateResponse.Builder context) throws java.io.IOExceptionParse the current token and update the parsing context appropriately.- Throws:
java.io.IOException
-