public class UpdateResponse extends DocWriteResponse
ReplicationResponse.ShardInfo
TransportResponse.Empty
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
EMPTY
EMPTY_PARAMS
Constructor and Description |
---|
UpdateResponse() |
UpdateResponse(ReplicationResponse.ShardInfo shardInfo,
ShardId shardId,
java.lang.String type,
java.lang.String id,
long version,
boolean created) |
UpdateResponse(ShardId shardId,
java.lang.String type,
java.lang.String id,
long version,
boolean created)
Constructor to be used when a update didn't translate in a write.
|
Modifier and Type | Method and Description |
---|---|
GetResult |
getGetResult() |
boolean |
isCreated()
Returns true if document was created due to an UPSERT operation
|
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 on
ShardInfo#status() |
java.lang.String |
toString() |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
getId, getIndex, getShardId, getType, getVersion
getShardInfo, setShardInfo
remoteAddress, remoteAddress
public UpdateResponse()
public UpdateResponse(ShardId shardId, java.lang.String type, java.lang.String id, long version, boolean created)
public UpdateResponse(ReplicationResponse.ShardInfo shardInfo, ShardId shardId, java.lang.String type, java.lang.String id, long version, boolean created)
public void setGetResult(GetResult getResult)
public GetResult getGetResult()
public boolean isCreated()
public RestStatus status()
DocWriteResponse
ShardInfo#status()
status
in interface StatusToXContent
status
in class DocWriteResponse
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
readFrom
in class DocWriteResponse
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
writeTo
in class DocWriteResponse
java.io.IOException
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
toXContent
in class DocWriteResponse
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object