Module org.elasticsearch.server
Class StartRecoveryRequest
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.AbstractTransportRequest
org.elasticsearch.indices.recovery.StartRecoveryRequest
- All Implemented Interfaces:
Writeable,RefCounted,TaskAwareRequest,TransportRequest
Represents a request for starting a peer recovery.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED -
Constructor Summary
ConstructorsConstructorDescriptionStartRecoveryRequest(ShardId shardId, String targetAllocationId, DiscoveryNode sourceNode, DiscoveryNode targetNode, long clusterStateVersion, Store.MetadataSnapshot metadataSnapshot, boolean primaryRelocation, long recoveryId, long startingSeqNo, boolean canDownloadSnapshotFiles) Construct a request for starting a peer recovery. -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongReturns optional description of the request to be displayed by the task managerbooleanlongshardId()longtoString()voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.transport.AbstractTransportRequest
getParentTask, getRequestId, remoteAddress, remoteAddress, setParentTask, setRequestIdMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.core.RefCounted
decRef, hasReferences, incRef, mustIncRef, tryIncRefMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, createTask, setParentTask
-
Constructor Details
-
StartRecoveryRequest
- Throws:
IOException
-
StartRecoveryRequest
public StartRecoveryRequest(ShardId shardId, String targetAllocationId, DiscoveryNode sourceNode, DiscoveryNode targetNode, long clusterStateVersion, Store.MetadataSnapshot metadataSnapshot, boolean primaryRelocation, long recoveryId, long startingSeqNo, boolean canDownloadSnapshotFiles) Construct a request for starting a peer recovery.- Parameters:
shardId- the shard ID to recovertargetAllocationId- the allocation id of the target shardsourceNode- the source node to remover fromtargetNode- the target node to recover toclusterStateVersion- the cluster state version which initiated the recoverymetadataSnapshot- the Lucene metadataprimaryRelocation- whether or not the recovery is a primary relocationrecoveryId- the recovery IDstartingSeqNo- the starting sequence numbercanDownloadSnapshotFiles- flag that indicates if the snapshot files can be downloaded
-
-
Method Details
-
recoveryId
public long recoveryId() -
shardId
-
targetAllocationId
-
sourceNode
-
targetNode
-
clusterStateVersion
public long clusterStateVersion() -
isPrimaryRelocation
public boolean isPrimaryRelocation() -
metadataSnapshot
-
startingSeqNo
public long startingSeqNo() -
canDownloadSnapshotFiles
public boolean canDownloadSnapshotFiles() -
getDescription
Description copied from interface:TaskAwareRequestReturns optional description of the request to be displayed by the task manager -
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classAbstractTransportRequest- Throws:
IOException
-
toString
- Overrides:
toStringin classAbstractTransportRequest
-