Class StartRecoveryRequest

java.lang.Object
All Implemented Interfaces:
Writeable, org.elasticsearch.common.util.concurrent.RefCounted, TaskAwareRequest

public class StartRecoveryRequest
extends TransportRequest
Represents a request for starting a peer recovery.
  • Constructor Details

    • StartRecoveryRequest

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

      public StartRecoveryRequest​(ShardId shardId, java.lang.String targetAllocationId, DiscoveryNode sourceNode, DiscoveryNode targetNode, Store.MetadataSnapshot metadataSnapshot, boolean primaryRelocation, long recoveryId, long startingSeqNo)
      Construct a request for starting a peer recovery.
      Parameters:
      shardId - the shard ID to recover
      targetAllocationId - the allocation id of the target shard
      sourceNode - the source node to remover from
      targetNode - the target node to recover to
      metadataSnapshot - the Lucene metadata
      primaryRelocation - whether or not the recovery is a primary relocation
      recoveryId - the recovery ID
      startingSeqNo - the starting sequence number
  • Method Details

    • recoveryId

      public long recoveryId()
    • shardId

      public ShardId shardId()
    • targetAllocationId

      public java.lang.String targetAllocationId()
    • sourceNode

      public DiscoveryNode sourceNode()
    • targetNode

      public DiscoveryNode targetNode()
    • isPrimaryRelocation

      public boolean isPrimaryRelocation()
    • metadataSnapshot

      public Store.MetadataSnapshot metadataSnapshot()
    • startingSeqNo

      public long startingSeqNo()
    • 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 TransportRequest
      Throws:
      java.io.IOException