Package org.elasticsearch.cluster
Class RestoreInProgress.ShardRestoreStatus
- java.lang.Object
-
- org.elasticsearch.cluster.RestoreInProgress.ShardRestoreStatus
-
- Enclosing class:
- RestoreInProgress
public static class RestoreInProgress.ShardRestoreStatus extends java.lang.Object
Represents status of a restored shard
-
-
Constructor Summary
Constructors Constructor Description ShardRestoreStatus(java.lang.String nodeId)
Constructs a new shard restore status in initializing state on the given nodeShardRestoreStatus(java.lang.String nodeId, RestoreInProgress.State state)
Constructs a new shard restore status in with specified state on the given nodeShardRestoreStatus(java.lang.String nodeId, RestoreInProgress.State state, java.lang.String reason)
Constructs a new shard restore status in with specified state on the given node with specified failure reason
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
hashCode()
java.lang.String
nodeId()
Returns node id of the node where shared is getting restoredvoid
readFrom(StreamInput in)
Reads restore status from stream inputstatic RestoreInProgress.ShardRestoreStatus
readShardRestoreStatus(StreamInput in)
Reads restore status from stream inputjava.lang.String
reason()
Returns failure reasonRestoreInProgress.State
state()
Returns current statevoid
writeTo(StreamOutput out)
Writes restore status to stream output
-
-
-
Constructor Detail
-
ShardRestoreStatus
public ShardRestoreStatus(java.lang.String nodeId)
Constructs a new shard restore status in initializing state on the given node- Parameters:
nodeId
- node id
-
ShardRestoreStatus
public ShardRestoreStatus(java.lang.String nodeId, RestoreInProgress.State state)
Constructs a new shard restore status in with specified state on the given node- Parameters:
nodeId
- node idstate
- restore state
-
ShardRestoreStatus
public ShardRestoreStatus(java.lang.String nodeId, RestoreInProgress.State state, java.lang.String reason)
Constructs a new shard restore status in with specified state on the given node with specified failure reason- Parameters:
nodeId
- node idstate
- restore statereason
- failure reason
-
-
Method Detail
-
state
public RestoreInProgress.State state()
Returns current state- Returns:
- current state
-
nodeId
public java.lang.String nodeId()
Returns node id of the node where shared is getting restored- Returns:
- node id
-
reason
public java.lang.String reason()
Returns failure reason- Returns:
- failure reason
-
readShardRestoreStatus
public static RestoreInProgress.ShardRestoreStatus readShardRestoreStatus(StreamInput in) throws java.io.IOException
Reads restore status from stream input- Parameters:
in
- stream input- Returns:
- restore status
- Throws:
java.io.IOException
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Reads restore status from stream input- Parameters:
in
- stream input- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Writes restore status to stream output- Parameters:
out
- stream input- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-