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.Result
-
Nested classes/interfaces inherited from class org.elasticsearch.action.support.replication.ReplicationResponse
ReplicationResponse.ShardInfo
-
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportResponse
TransportResponse.Empty
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.action.DocWriteResponse
result
-
Fields inherited from class org.elasticsearch.action.support.replication.ReplicationResponse
EMPTY
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
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, toXContent
-
Methods inherited from class org.elasticsearch.action.support.replication.ReplicationResponse
getShardInfo, setShardInfo
-
Methods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Constructor Detail
-
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 Detail
-
setGetResult
public void setGetResult(GetResult getResult)
-
getGetResult
public GetResult getGetResult()
-
status
public RestStatus status()
Description copied from class:DocWriteResponsereturns the rest status for this response (based onReplicationResponse.ShardInfo.status()- Specified by:
statusin interfaceStatusToXContentObject- Overrides:
statusin classDocWriteResponse
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
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
public static UpdateResponse fromXContent(XContentParser parser) throws java.io.IOException
- Throws:
java.io.IOException
-
parseXContentFields
public static void parseXContentFields(XContentParser parser, UpdateResponse.Builder context) throws java.io.IOException
Parse the current token and update the parsing context appropriately.- Throws:
java.io.IOException
-
-