Class StartRecoveryRequest

java.lang.Object
org.opensearch.core.transport.TransportMessage
org.opensearch.transport.TransportRequest
org.opensearch.indices.recovery.StartRecoveryRequest
All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable, TaskAwareRequest

@PublicApi(since="1.0.0") public class StartRecoveryRequest extends TransportRequest
Represents a request for starting a peer recovery.
Opensearch.api:
  • Constructor Details

    • StartRecoveryRequest

      public StartRecoveryRequest(org.opensearch.core.common.io.stream.StreamInput in) throws IOException
      Throws:
      IOException
    • StartRecoveryRequest

      public StartRecoveryRequest(org.opensearch.core.index.shard.ShardId shardId, 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 org.opensearch.core.index.shard.ShardId shardId()
    • targetAllocationId

      public 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(org.opensearch.core.common.io.stream.StreamOutput out) throws IOException
      Specified by:
      writeTo in interface org.opensearch.core.common.io.stream.Writeable
      Overrides:
      writeTo in class TransportRequest
      Throws:
      IOException