Module org.elasticsearch.server
Class IndexShardSnapshotStatus
java.lang.Object
org.elasticsearch.index.snapshots.IndexShardSnapshotStatus
Represent shard snapshot status
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumUsed to complete listeners added viaaddAbortListener(org.elasticsearch.action.ActionListener<org.elasticsearch.index.snapshots.IndexShardSnapshotStatus.AbortStatus>)when the shard snapshot is either aborted/paused or it gets past the stages where an abort/pause could have occurred.static classReturns an immutable state ofIndexShardSnapshotStatusat a given point in time.static enumSnapshot stage -
Method Summary
Modifier and TypeMethodDescriptionvoidabortIfNotCompleted(String failure, Consumer<ActionListener<Releasable>> notifyRunner) voidvoidaddProcessedFile(long size) Increments number of processed filesvoidaddProcessedFiles(int count, long totalSize) asCopy()Returns a copy of the currentIndexShardSnapshotStatus.voidstatic voidensureNotAborted(IndexShardSnapshotStatus.Stage shardSnapshotStage) getStage()longbooleanisPaused()voidmoveToDone(long endTimeMillis, ShardSnapshotResult shardSnapshotResult) voidmoveToFailed(long endTime, String failure) moveToStarted(long startTimeMillis, int incrementalFileCount, int totalFileCount, long incrementalSize, long totalSize) moveToUnsuccessful(IndexShardSnapshotStatus.Stage newStage, String failure, long endTime) newDone(long startTime, long totalTime, int incrementalFileCount, int fileCount, long incrementalSize, long size, ShardGeneration generation) static IndexShardSnapshotStatusnewInitializing(ShardGeneration generation) voidpauseIfNotCompleted(Consumer<ActionListener<Releasable>> notifyRunner) toString()voidupdateStatusDescription(String statusString) Updates the string explanation for what the snapshot is actively doing right now.
-
Method Details
-
moveToStarted
public IndexShardSnapshotStatus.Copy moveToStarted(long startTimeMillis, int incrementalFileCount, int totalFileCount, long incrementalSize, long totalSize) -
moveToFinalize
-
moveToDone
-
getStage
-
getTotalTimeMillis
public long getTotalTimeMillis() -
addAbortListener
-
abortIfNotCompleted
-
pauseIfNotCompleted
-
moveToUnsuccessful
public SnapshotsInProgress.ShardState moveToUnsuccessful(IndexShardSnapshotStatus.Stage newStage, String failure, long endTime) -
moveToFailed
-
generation
-
getShardSnapshotResult
-
ensureNotAborted
public void ensureNotAborted() -
ensureNotAborted
-
isPaused
public boolean isPaused() -
addProcessedFile
public void addProcessedFile(long size) Increments number of processed files -
addProcessedFiles
public void addProcessedFiles(int count, long totalSize) -
updateStatusDescription
Updates the string explanation for what the snapshot is actively doing right now. -
asCopy
Returns a copy of the currentIndexShardSnapshotStatus. This method is intended to be used when a coherent state ofIndexShardSnapshotStatusis needed.- Returns:
- a
IndexShardSnapshotStatus.Copy
-
newInitializing
-
newFailed
-
newDone
public static IndexShardSnapshotStatus.Copy newDone(long startTime, long totalTime, int incrementalFileCount, int fileCount, long incrementalSize, long size, ShardGeneration generation) -
toString
-