Streamable
, Writeable
, ToXContent
, ToXContentObject
ClearIndicesCacheResponse
, FlushResponse
, ForceMergeResponse
, IndicesSegmentResponse
, IndicesStatsResponse
, RecoveryResponse
, RefreshResponse
, UpgradeResponse
, UpgradeStatusResponse
, ValidateQueryResponse
public class BroadcastResponse extends ActionResponse implements ToXContentObject
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
TransportResponse.Empty
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field | Description |
---|---|---|
static DefaultShardOperationFailedException[] |
EMPTY |
EMPTY_PARAMS
Constructor | Description |
---|---|
BroadcastResponse() |
|
BroadcastResponse(int totalShards,
int successfulShards,
int failedShards,
java.util.List<DefaultShardOperationFailedException> shardFailures) |
Modifier and Type | Method | Description |
---|---|---|
protected void |
addCustomXContentFields(XContentBuilder builder,
ToXContent.Params params) |
Override in subclass to add custom fields following the common `_shards` field
|
protected static <T extends BroadcastResponse> |
declareBroadcastFields(ConstructingObjectParser<T,java.lang.Void> PARSER) |
|
int |
getFailedShards() |
The failed shards this request was executed on.
|
DefaultShardOperationFailedException[] |
getShardFailures() |
The list of shard failures exception.
|
RestStatus |
getStatus() |
The REST status that should be used for the response
|
int |
getSuccessfulShards() |
The successful shards this request was executed on.
|
int |
getTotalShards() |
The total shards this request ran against.
|
void |
readFrom(StreamInput in) |
Set this object's fields from a StreamInput.
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
|
void |
writeTo(StreamOutput out) |
Write this object's fields to a StreamOutput.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isFragment
remoteAddress, remoteAddress
public static final DefaultShardOperationFailedException[] EMPTY
public BroadcastResponse()
public BroadcastResponse(int totalShards, int successfulShards, int failedShards, java.util.List<DefaultShardOperationFailedException> shardFailures)
protected static <T extends BroadcastResponse> void declareBroadcastFields(ConstructingObjectParser<T,java.lang.Void> PARSER)
public int getTotalShards()
public int getSuccessfulShards()
public int getFailedShards()
public RestStatus getStatus()
public DefaultShardOperationFailedException[] getShardFailures()
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
readFrom
in class ActionResponse
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
writeTo
in interface Writeable
writeTo
in class ActionResponse
java.io.IOException
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
protected void addCustomXContentFields(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
java.io.IOException