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 classSnapshot stage -
Method Summary
Modifier and TypeMethodDescriptionvoidabortIfNotCompleted(String failure)voidaddProcessedFile(long size)Increments number of processed filesasCopy()Returns a copy of the currentIndexShardSnapshotStatus.booleanvoidmoveToDone(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, String generation)static IndexShardSnapshotStatusstatic IndexShardSnapshotStatusnewInitializing(String 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() -
addProcessedFile
public void addProcessedFile(long size)Increments number of processed files -
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, String generation)
-