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
.java.lang.String
generation()
ShardSnapshotResult
getShardSnapshotResult()
boolean
isAborted()
void
moveToDone(long endTime, ShardSnapshotResult shardSnapshotResult)
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, java.lang.String generation)
static IndexShardSnapshotStatus
newFailed(java.lang.String failure)
static IndexShardSnapshotStatus
newInitializing(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
-
abortIfNotCompleted
public void abortIfNotCompleted(java.lang.String failure) -
moveToFailed
public void moveToFailed(long endTime, java.lang.String failure) -
generation
public java.lang.String 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, java.lang.String generation)
-