Class IndexShardSnapshotStatus
java.lang.Object
org.elasticsearch.index.snapshots.IndexShardSnapshotStatus
public class IndexShardSnapshotStatus
extends java.lang.Object
Represent shard snapshot status
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIndexShardSnapshotStatus.CopyReturns an immutable state ofIndexShardSnapshotStatusat a given point in time.static classIndexShardSnapshotStatus.StageSnapshot stage -
Method Summary
Modifier and Type Method Description voidabortIfNotCompleted(java.lang.String failure)voidaddProcessedFile(long size)Increments number of processed filesIndexShardSnapshotStatus.CopyasCopy()Returns a copy of the currentIndexShardSnapshotStatus.java.lang.Stringgeneration()booleanisAborted()voidmoveToDone(long endTime, java.lang.String newGeneration)voidmoveToFailed(long endTime, java.lang.String failure)IndexShardSnapshotStatus.CopymoveToFinalize(long indexVersion)IndexShardSnapshotStatus.CopymoveToStarted(long startTime, int incrementalFileCount, int totalFileCount, long incrementalSize, long totalSize)static IndexShardSnapshotStatusnewDone(long startTime, long totalTime, int incrementalFileCount, int fileCount, long incrementalSize, long size, java.lang.String generation)static IndexShardSnapshotStatusnewFailed(java.lang.String failure)static IndexShardSnapshotStatusnewInitializing(java.lang.String generation)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
moveToStarted
public IndexShardSnapshotStatus.Copy moveToStarted(long startTime, int incrementalFileCount, int totalFileCount, long incrementalSize, long totalSize) -
moveToFinalize
-
moveToDone
public void moveToDone(long endTime, java.lang.String newGeneration) -
abortIfNotCompleted
public void abortIfNotCompleted(java.lang.String failure) -
moveToFailed
public void moveToFailed(long endTime, java.lang.String failure) -
generation
public java.lang.String generation() -
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, java.lang.String generation)
-