Class RecoveryResponse
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportResponse
org.elasticsearch.action.ActionResponse
org.elasticsearch.action.support.broadcast.BroadcastResponse
org.elasticsearch.action.admin.indices.recovery.RecoveryResponse
- All Implemented Interfaces:
Writeable,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentObject,org.elasticsearch.core.RefCounted
Information regarding the recovery state of indices and their associated shards.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.action.ActionResponse
ActionResponse.EmptyNested 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.ParamsNested 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.support.broadcast.BroadcastResponse
EMPTYFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionRecoveryResponse(int totalShards, int successfulShards, int failedShards, Map<String,List<RecoveryState>> shardRecoveryStates, List<DefaultShardOperationFailedException> shardFailures)Constructs recovery information for a collection of indices and associated shards. -
Method Summary
Modifier and TypeMethodDescriptionbooleantoString()org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)voidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.broadcast.BroadcastResponse
addCustomXContentFields, declareBroadcastFields, getFailedShards, getShardFailures, getStatus, getSuccessfulShards, getTotalShardsMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
RecoveryResponse
- Throws:
IOException
-
RecoveryResponse
public RecoveryResponse(int totalShards, int successfulShards, int failedShards, Map<String,List<RecoveryState>> shardRecoveryStates, List<DefaultShardOperationFailedException> shardFailures)Constructs recovery information for a collection of indices and associated shards. Keeps track of how many total shards were seen, and out of those how many were successfully processed and how many failed.- Parameters:
totalShards- Total count of shards seensuccessfulShards- Count of shards successfully processedfailedShards- Count of shards which failed to processshardRecoveryStates- Map of indices to shard recovery informationshardFailures- List of failures processing shards
-
-
Method Details
-
hasRecoveries
public boolean hasRecoveries() -
shardRecoveryStates
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Overrides:
toXContentin classBroadcastResponse- Throws:
IOException
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classBroadcastResponse- Throws:
IOException
-
toString
-