Class RecoveryResponse

All Implemented Interfaces:
Writeable, org.elasticsearch.common.util.concurrent.RefCounted, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject

public class RecoveryResponse
extends BroadcastResponse
Information regarding the recovery state of indices and their associated shards.
  • Constructor Details

    • RecoveryResponse

      public RecoveryResponse​(StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException
    • RecoveryResponse

      public RecoveryResponse​(int totalShards, int successfulShards, int failedShards, java.util.Map<java.lang.String,​java.util.List<RecoveryState>> shardRecoveryStates, java.util.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 seen
      successfulShards - Count of shards successfully processed
      failedShards - Count of shards which failed to process
      shardRecoveryStates - Map of indices to shard recovery information
      shardFailures - List of failures processing shards
  • Method Details

    • hasRecoveries

      public boolean hasRecoveries()
    • shardRecoveryStates

      public java.util.Map<java.lang.String,​java.util.List<RecoveryState>> shardRecoveryStates()
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Overrides:
      toXContent in class BroadcastResponse
      Throws:
      java.io.IOException
    • writeTo

      public void writeTo​(StreamOutput out) throws java.io.IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Overrides:
      writeTo in class BroadcastResponse
      Throws:
      java.io.IOException
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object