Package org.elasticsearch.cluster
Class SnapshotsInProgress.ShardSnapshotStatus
java.lang.Object
org.elasticsearch.cluster.SnapshotsInProgress.ShardSnapshotStatus
- All Implemented Interfaces:
Writeable
- Enclosing class:
- SnapshotsInProgress
public static class SnapshotsInProgress.ShardSnapshotStatus extends java.lang.Object implements Writeable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields Modifier and Type Field Description static SnapshotsInProgress.ShardSnapshotStatus
MISSING
Shard snapshot status for shards that could not be snapshotted because their index was deleted from before the shard snapshot started.static SnapshotsInProgress.ShardSnapshotStatus
UNASSIGNED_QUEUED
Shard snapshot status for shards that are waiting for another operation to finish before they can be assigned to a node. -
Constructor Summary
Constructors Constructor Description ShardSnapshotStatus(java.lang.String nodeId, java.lang.String generation)
ShardSnapshotStatus(java.lang.String nodeId, SnapshotsInProgress.ShardState state, java.lang.String generation)
ShardSnapshotStatus(java.lang.String nodeId, SnapshotsInProgress.ShardState state, java.lang.String reason, java.lang.String generation)
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
generation()
int
hashCode()
boolean
isActive()
Checks if this shard snapshot is actively executing.java.lang.String
nodeId()
static SnapshotsInProgress.ShardSnapshotStatus
readFrom(StreamInput in)
java.lang.String
reason()
ShardSnapshotResult
shardSnapshotResult()
SnapshotsInProgress.ShardState
state()
static SnapshotsInProgress.ShardSnapshotStatus
success(java.lang.String nodeId, ShardSnapshotResult shardSnapshotResult)
java.lang.String
toString()
void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
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
public ShardSnapshotStatus(java.lang.String nodeId, java.lang.String generation) -
ShardSnapshotStatus
public ShardSnapshotStatus(@Nullable java.lang.String nodeId, SnapshotsInProgress.ShardState state, @Nullable java.lang.String generation) -
ShardSnapshotStatus
public ShardSnapshotStatus(@Nullable java.lang.String nodeId, SnapshotsInProgress.ShardState state, java.lang.String reason, @Nullable java.lang.String generation)
-
-
Method Details
-
success
public static SnapshotsInProgress.ShardSnapshotStatus success(java.lang.String nodeId, ShardSnapshotResult shardSnapshotResult) -
readFrom
public static SnapshotsInProgress.ShardSnapshotStatus readFrom(StreamInput in) throws java.io.IOException- Throws:
java.io.IOException
-
state
-
nodeId
@Nullable public java.lang.String nodeId() -
generation
@Nullable public java.lang.String generation() -
reason
public java.lang.String reason() -
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. -
equals
public boolean equals(java.lang.Object o)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-