Package org.elasticsearch.action.update
Class UpdateResponse
- java.lang.Object
-
- All Implemented Interfaces:
WriteResponse,Streamable,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()UpdateResponse(ReplicationResponse.ShardInfo shardInfo, ShardId shardId, java.lang.String type, java.lang.String id, long seqNo, long primaryTerm, long version, DocWriteResponse.Result result)UpdateResponse(ShardId shardId, java.lang.String type, java.lang.String id, 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.voidreadFrom(StreamInput in)Set this object's fields from a StreamInput.voidsetGetResult(GetResult getResult)RestStatusstatus()returns the rest status for this response (based onReplicationResponse.ShardInfo.status()java.lang.StringtoString()voidwriteTo(StreamOutput out)Write this object's fields to a 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()
-
UpdateResponse
public UpdateResponse(ShardId shardId, java.lang.String type, java.lang.String id, 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
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:StreamableSet this object's fields from a StreamInput.- Specified by:
readFromin interfaceStreamable- Overrides:
readFromin classDocWriteResponse- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:StreamableWrite this object's fields to a StreamOutput.- Specified by:
writeToin interfaceStreamable- 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
-
-