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 classReturns an immutable state ofIndexShardSnapshotStatusat a given point in time.static enumSnapshot stage -
Method Summary
Modifier and TypeMethodDescriptionvoidabortIfNotCompleted(String failure) voidaddProcessedFile(long size) Increments number of processed filesvoidaddProcessedFiles(int count, long totalSize) asCopy()Returns a copy of the currentIndexShardSnapshotStatus.voidbooleanvoidmoveToDone(long endTime, ShardSnapshotResult shardSnapshotResult) voidmoveToFailed(long endTime, String failure) moveToFinalize(long indexVersion) moveToStarted(long startTime, int incrementalFileCount, int totalFileCount, long incrementalSize, long totalSize) static IndexShardSnapshotStatusnewDone(long startTime, long totalTime, int incrementalFileCount, int fileCount, long incrementalSize, long size, ShardGeneration generation) static IndexShardSnapshotStatusstatic IndexShardSnapshotStatusnewInitializing(ShardGeneration generation)
-
Method Details
-
moveToStarted
public IndexShardSnapshotStatus.Copy moveToStarted(long startTime, int incrementalFileCount, int totalFileCount, long incrementalSize, long totalSize) -
moveToFinalize
-
moveToDone
-
abortIfNotCompleted
-
moveToFailed
-
generation
-
getShardSnapshotResult
-
isAborted
public boolean isAborted() -
ensureNotAborted
public void ensureNotAborted() -
addProcessedFile
public void addProcessedFile(long size) Increments number of processed files -
addProcessedFiles
public void addProcessedFiles(int count, long totalSize) -
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 newDone(long startTime, long totalTime, int incrementalFileCount, int fileCount, long incrementalSize, long size, ShardGeneration generation)
-