- All Implemented Interfaces:
WriteResponse,Writeable,StatusToXContentObject,RefCounted,ToXContent,ToXContentObject
-
Nested Class Summary
Nested ClassesNested 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.action.ActionResponse
ActionResponse.EmptyNested classes/interfaces inherited from interface org.elasticsearch.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
Fields inherited from class org.elasticsearch.action.DocWriteResponse
resultFields inherited from class org.elasticsearch.action.support.replication.ReplicationResponse
EMPTYFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionUpdateResponse(ReplicationResponse.ShardInfo shardInfo, ShardId shardId, String id, long seqNo, long primaryTerm, long version, DocWriteResponse.Result result) UpdateResponse(ShardId shardId, String id, long seqNo, long primaryTerm, long version, DocWriteResponse.Result result) Constructor to be used when a update didn't translate in a write.UpdateResponse(ShardId shardId, StreamInput in) -
Method Summary
Modifier and TypeMethodDescriptionstatic UpdateResponsefromXContent(XContentParser parser) innerToXContent(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) status()returns the rest status for this response (based onReplicationResponse.ShardInfo.status()toString()voidwriteThin(StreamOutput out) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.DocWriteResponse
forcedRefresh, getId, getIndex, getLocation, getPrimaryTerm, getResult, getSeqNo, getShardId, getVersion, parseInnerToXContent, setForcedRefresh, toXContentMethods inherited from class org.elasticsearch.action.support.replication.ReplicationResponse
getShardInfo, setShardInfoMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
UpdateResponse
- Throws:
IOException
-
UpdateResponse
- Throws:
IOException
-
UpdateResponse
public UpdateResponse(ShardId shardId, 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, 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
-
writeThin
- Overrides:
writeThinin classDocWriteResponse- Throws:
IOException
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classDocWriteResponse- Throws:
IOException
-
innerToXContent
public XContentBuilder innerToXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Overrides:
innerToXContentin classDocWriteResponse- Throws:
IOException
-
toString
-
fromXContent
- Throws:
IOException
-
parseXContentFields
public static void parseXContentFields(XContentParser parser, UpdateResponse.Builder context) throws IOException Parse the current token and update the parsing context appropriately.- Throws:
IOException
-