Class IndexShardSnapshotStatus
java.lang.Object
org.elasticsearch.index.snapshots.IndexShardSnapshotStatus
Represent shard snapshot status
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Returns an immutable state ofIndexShardSnapshotStatus
at a given point in time.static class
Snapshot stage -
Method Summary
Modifier and TypeMethodDescriptionvoid
abortIfNotCompleted(String failure)
void
addProcessedFile(long size)
Increments number of processed filesasCopy()
Returns a copy of the currentIndexShardSnapshotStatus
.boolean
void
moveToDone(long endTime, ShardSnapshotResult shardSnapshotResult)
void
moveToFailed(long endTime, String failure)
moveToFinalize(long indexVersion)
moveToStarted(long startTime, int incrementalFileCount, int totalFileCount, long incrementalSize, long totalSize)
static IndexShardSnapshotStatus
newDone(long startTime, long totalTime, int incrementalFileCount, int fileCount, long incrementalSize, long size, String generation)
static IndexShardSnapshotStatus
static IndexShardSnapshotStatus
newInitializing(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 ofIndexShardSnapshotStatus
is 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)
-