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.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.support.broadcast.BroadcastResponse
EMPTY
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionRecoveryResponse(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 TypeMethodDescriptionboolean
toString()
org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.broadcast.BroadcastResponse
addCustomXContentFields, declareBroadcastFields, getFailedShards, getShardFailures, getStatus, getSuccessfulShards, getTotalShards
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
-
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:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Overrides:
toXContent
in classBroadcastResponse
- Throws:
IOException
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classBroadcastResponse
- Throws:
IOException
-
toString
-