Package org.elasticsearch.cluster
Class SnapshotsInProgress.ShardSnapshotStatus
java.lang.Object
org.elasticsearch.cluster.SnapshotsInProgress.ShardSnapshotStatus
- All Implemented Interfaces:
Writeable
- Enclosing class:
- SnapshotsInProgress
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Modifier and TypeFieldDescriptionShard snapshot status for shards that could not be snapshotted because their index was deleted from before the shard snapshot started.Shard snapshot status for shards that are waiting for another operation to finish before they can be assigned to a node. -
Constructor Summary
ConstructorDescriptionShardSnapshotStatus(String nodeId, String generation)
ShardSnapshotStatus(String nodeId, SnapshotsInProgress.ShardState state, String generation)
ShardSnapshotStatus(String nodeId, SnapshotsInProgress.ShardState state, String reason, String generation)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
boolean
isActive()
Checks if this shard snapshot is actively executing.nodeId()
readFrom(StreamInput in)
reason()
state()
success(String nodeId, ShardSnapshotResult shardSnapshotResult)
toString()
withUpdatedGeneration(String newGeneration)
void
writeTo(StreamOutput out)
Write this into the StreamOutput.
-
Field Details
-
UNASSIGNED_QUEUED
Shard snapshot status for shards that are waiting for another operation to finish before they can be assigned to a node. -
MISSING
Shard snapshot status for shards that could not be snapshotted because their index was deleted from before the shard snapshot started.
-
-
Constructor Details
-
ShardSnapshotStatus
-
ShardSnapshotStatus
public ShardSnapshotStatus(@Nullable String nodeId, SnapshotsInProgress.ShardState state, @Nullable String generation) -
ShardSnapshotStatus
public ShardSnapshotStatus(@Nullable String nodeId, SnapshotsInProgress.ShardState state, String reason, @Nullable String generation)
-
-
Method Details
-
success
public static SnapshotsInProgress.ShardSnapshotStatus success(String nodeId, ShardSnapshotResult shardSnapshotResult) -
readFrom
- Throws:
IOException
-
state
-
nodeId
-
generation
-
reason
-
withUpdatedGeneration
-
shardSnapshotResult
-
isActive
public boolean isActive()Checks if this shard snapshot is actively executing. A shard is defined as actively executing if it either is in a state that may write to the repository (SnapshotsInProgress.ShardState.INIT
orSnapshotsInProgress.ShardState.ABORTED
) or about to write to it in stateSnapshotsInProgress.ShardState.WAITING
. -
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-