Package org.elasticsearch.cluster
Class RestoreInProgress.ShardRestoreStatus
java.lang.Object
org.elasticsearch.cluster.RestoreInProgress.ShardRestoreStatus
- All Implemented Interfaces:
Writeable
- Enclosing class:
- RestoreInProgress
Represents status of a restored shard
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Constructor Summary
ConstructorDescriptionShardRestoreStatus(String nodeId)
Constructs a new shard restore status in initializing state on the given nodeShardRestoreStatus(String nodeId, RestoreInProgress.State state)
Constructs a new shard restore status in with specified state on the given nodeShardRestoreStatus(String nodeId, RestoreInProgress.State state, String reason)
Constructs a new shard restore status in with specified state on the given node with specified failure reason -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
nodeId()
Returns node id of the node where shared is getting restoredvoid
readFrom(StreamInput in)
Reads restore status from stream inputReads restore status from stream inputreason()
Returns failure reasonstate()
Returns current statevoid
writeTo(StreamOutput out)
Writes restore status to stream output
-
Constructor Details
-
ShardRestoreStatus
Constructs a new shard restore status in initializing state on the given node- Parameters:
nodeId
- node id
-
ShardRestoreStatus
Constructs a new shard restore status in with specified state on the given node- Parameters:
nodeId
- node idstate
- restore state
-
ShardRestoreStatus
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 Details
-
state
Returns current state- Returns:
- current state
-
nodeId
Returns node id of the node where shared is getting restored- Returns:
- node id
-
reason
Returns failure reason- Returns:
- failure reason
-
readShardRestoreStatus
public static RestoreInProgress.ShardRestoreStatus readShardRestoreStatus(StreamInput in) throws IOExceptionReads restore status from stream input- Parameters:
in
- stream input- Returns:
- restore status
- Throws:
IOException
-
readFrom
Reads restore status from stream input- Parameters:
in
- stream input- Throws:
IOException
-
writeTo
Writes restore status to stream output- Specified by:
writeTo
in interfaceWriteable
- Parameters:
out
- stream input- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-