Class AsyncRecoveryTarget
java.lang.Object
org.elasticsearch.indices.recovery.AsyncRecoveryTarget
- All Implemented Interfaces:
RecoveryTargetHandler
Wraps a
RecoveryTarget to make all remote calls to be executed asynchronously using the provided executor.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanFiles(int totalTranslogOps, long globalCheckpoint, Store.MetadataSnapshot sourceMetadata, ActionListener<Void> listener) voidfinalizeRecovery(long globalCheckpoint, long trimAboveSeqNo, ActionListener<Void> listener) voidhandoffPrimaryContext(ReplicationTracker.PrimaryContext primaryContext, ActionListener<Void> listener) voidindexTranslogOperations(List<Translog.Operation> operations, int totalTranslogOps, long maxSeenAutoIdTimestampOnPrimary, long maxSeqNoOfDeletesOrUpdatesOnPrimary, RetentionLeases retentionLeases, long mappingVersionOnPrimary, ActionListener<Long> listener) voidprepareForTranslogOperations(int totalTranslogOps, ActionListener<Void> listener) voidreceiveFileInfo(List<String> phase1FileNames, List<Long> phase1FileSizes, List<String> phase1ExistingFileNames, List<Long> phase1ExistingFileSizes, int totalTranslogOps, ActionListener<Void> listener) voidrestoreFileFromSnapshot(String repository, IndexId indexId, BlobStoreIndexShardSnapshot.FileInfo snapshotFile, ActionListener<Void> listener) voidwriteFileChunk(StoreFileMetadata fileMetadata, long position, ReleasableBytesReference content, boolean lastChunk, int totalTranslogOps, ActionListener<Void> listener) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.indices.recovery.RecoveryTargetHandler
cancel
-
Constructor Details
-
AsyncRecoveryTarget
-
-
Method Details
-
prepareForTranslogOperations
- Specified by:
prepareForTranslogOperationsin interfaceRecoveryTargetHandler
-
finalizeRecovery
public void finalizeRecovery(long globalCheckpoint, long trimAboveSeqNo, ActionListener<Void> listener) - Specified by:
finalizeRecoveryin interfaceRecoveryTargetHandler
-
handoffPrimaryContext
public void handoffPrimaryContext(ReplicationTracker.PrimaryContext primaryContext, ActionListener<Void> listener) - Specified by:
handoffPrimaryContextin interfaceRecoveryTargetHandler
-
indexTranslogOperations
public void indexTranslogOperations(List<Translog.Operation> operations, int totalTranslogOps, long maxSeenAutoIdTimestampOnPrimary, long maxSeqNoOfDeletesOrUpdatesOnPrimary, RetentionLeases retentionLeases, long mappingVersionOnPrimary, ActionListener<Long> listener) - Specified by:
indexTranslogOperationsin interfaceRecoveryTargetHandler
-
receiveFileInfo
public void receiveFileInfo(List<String> phase1FileNames, List<Long> phase1FileSizes, List<String> phase1ExistingFileNames, List<Long> phase1ExistingFileSizes, int totalTranslogOps, ActionListener<Void> listener) - Specified by:
receiveFileInfoin interfaceRecoveryTargetHandler
-
cleanFiles
public void cleanFiles(int totalTranslogOps, long globalCheckpoint, Store.MetadataSnapshot sourceMetadata, ActionListener<Void> listener) - Specified by:
cleanFilesin interfaceRecoveryTargetHandler
-
writeFileChunk
public void writeFileChunk(StoreFileMetadata fileMetadata, long position, ReleasableBytesReference content, boolean lastChunk, int totalTranslogOps, ActionListener<Void> listener) - Specified by:
writeFileChunkin interfaceRecoveryTargetHandler
-
restoreFileFromSnapshot
public void restoreFileFromSnapshot(String repository, IndexId indexId, BlobStoreIndexShardSnapshot.FileInfo snapshotFile, ActionListener<Void> listener) - Specified by:
restoreFileFromSnapshotin interfaceRecoveryTargetHandler
-