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 class
IndexShardSnapshotStatus.Copy
Returns an immutable state ofIndexShardSnapshotStatus
at a given point in time.static class
IndexShardSnapshotStatus.Stage
Snapshot stage
-
Method Summary
Modifier and Type Method Description void
abortIfNotCompleted(java.lang.String failure)
void
addProcessedFile(long size)
Increments number of processed filesIndexShardSnapshotStatus.Copy
asCopy()
Returns a copy of the currentIndexShardSnapshotStatus
.boolean
isAborted()
void
moveToDone(long endTime)
void
moveToFailed(long endTime, java.lang.String failure)
IndexShardSnapshotStatus.Copy
moveToFinalize(long indexVersion)
IndexShardSnapshotStatus.Copy
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)
static IndexShardSnapshotStatus
newFailed(java.lang.String failure)
static IndexShardSnapshotStatus
newInitializing()
-
-
-
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 void moveToDone(long endTime)
-
abortIfNotCompleted
public void 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 ofIndexShardSnapshotStatus
is 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)
-
-