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 class
UpdateResponse.Builder
Builder 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 UpdateResponse
fromXContent(XContentParser parser)
GetResult
getGetResult()
XContentBuilder
innerToXContent(XContentBuilder builder, ToXContent.Params params)
static void
parseXContentFields(XContentParser parser, UpdateResponse.Builder context)
Parse the current token and update the parsing context appropriately.void
readFrom(StreamInput in)
Set this object's fields from a StreamInput.void
setGetResult(GetResult getResult)
RestStatus
status()
returns the rest status for this response (based onReplicationResponse.ShardInfo.status()
java.lang.String
toString()
void
writeTo(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:DocWriteResponse
returns the rest status for this response (based onReplicationResponse.ShardInfo.status()
- Specified by:
status
in interfaceStatusToXContentObject
- Overrides:
status
in classDocWriteResponse
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:Streamable
Set this object's fields from a StreamInput.- Specified by:
readFrom
in interfaceStreamable
- Overrides:
readFrom
in classDocWriteResponse
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write this object's fields to a StreamOutput.- Specified by:
writeTo
in interfaceStreamable
- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classDocWriteResponse
- Throws:
java.io.IOException
-
innerToXContent
public XContentBuilder innerToXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Overrides:
innerToXContent
in classDocWriteResponse
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in 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
-
-