Class IndexShardSnapshotStatus
- java.lang.Object
-
- org.elasticsearch.index.snapshots.IndexShardSnapshotStatus
-
public class IndexShardSnapshotStatus extends java.lang.ObjectRepresent 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IndexShardSnapshotStatus.CopyabortIfNotCompleted(java.lang.String failure)voidaddProcessedFile(long size)Increments number of processed filesIndexShardSnapshotStatus.CopyasCopy()Returns a copy of the currentIndexShardSnapshotStatus.booleanisAborted()IndexShardSnapshotStatus.CopymoveToDone(long endTime)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)static IndexShardSnapshotStatusnewFailed(java.lang.String failure)static IndexShardSnapshotStatusnewInitializing()
-
-
-
Method Detail
-
moveToStarted
public IndexShardSnapshotStatus.Copy moveToStarted(long startTime, int incrementalFileCount, int totalFileCount, long incrementalSize, long totalSize)
-
moveToFinalize
public IndexShardSnapshotStatus.Copy moveToFinalize(long indexVersion)
-
moveToDone
public IndexShardSnapshotStatus.Copy moveToDone(long endTime)
-
abortIfNotCompleted
public IndexShardSnapshotStatus.Copy abortIfNotCompleted(java.lang.String failure)
-
moveToFailed
public void moveToFailed(long endTime, java.lang.String failure)
-
isAborted
public boolean isAborted()
-
addProcessedFile
public void addProcessedFile(long size)
Increments number of processed files
-
asCopy
public IndexShardSnapshotStatus.Copy 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
public static IndexShardSnapshotStatus newInitializing()
-
newFailed
public static IndexShardSnapshotStatus newFailed(java.lang.String failure)
-
newDone
public static IndexShardSnapshotStatus newDone(long startTime, long totalTime, int incrementalFileCount, int fileCount, long incrementalSize, long size)
-
-