Package org.elasticsearch.action.update
Class UpdateResponse
java.lang.Object
- All Implemented Interfaces:
WriteResponse
,Writeable
,org.elasticsearch.common.util.concurrent.RefCounted
,StatusToXContentObject
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.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.action.ActionResponse
ActionResponse.Empty
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.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.UpdateResponse(ShardId shardId, StreamInput in)
-
Method Summary
Modifier and Type Method Description static UpdateResponse
fromXContent(org.elasticsearch.common.xcontent.XContentParser parser)
GetResult
getGetResult()
org.elasticsearch.common.xcontent.XContentBuilder
innerToXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
static void
parseXContentFields(org.elasticsearch.common.xcontent.XContentParser parser, UpdateResponse.Builder context)
Parse the current token and update the parsing context appropriately.void
setGetResult(GetResult getResult)
RestStatus
status()
returns the rest status for this response (based onReplicationResponse.ShardInfo.status()
java.lang.String
toString()
void
writeThin(StreamOutput out)
void
writeTo(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
decRef, incRef, remoteAddress, remoteAddress, tryIncRef
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 Details
-
UpdateResponse
- Throws:
java.io.IOException
-
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:DocWriteResponse
returns the rest status for this response (based onReplicationResponse.ShardInfo.status()
- Specified by:
status
in interfaceStatusToXContentObject
- Overrides:
status
in classDocWriteResponse
-
writeThin
- Overrides:
writeThin
in classDocWriteResponse
- Throws:
java.io.IOException
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classDocWriteResponse
- Throws:
java.io.IOException
-
innerToXContent
public org.elasticsearch.common.xcontent.XContentBuilder innerToXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.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(org.elasticsearch.common.xcontent.XContentParser parser) throws java.io.IOException- Throws:
java.io.IOException
-
parseXContentFields
public static void parseXContentFields(org.elasticsearch.common.xcontent.XContentParser parser, UpdateResponse.Builder context) throws java.io.IOExceptionParse the current token and update the parsing context appropriately.- Throws:
java.io.IOException
-