Package org.elasticsearch.cluster
Class RestoreInProgress.ShardRestoreStatus
java.lang.Object
org.elasticsearch.cluster.RestoreInProgress.ShardRestoreStatus
- All Implemented Interfaces:
Writeable
- Enclosing class:
- RestoreInProgress
public static class RestoreInProgress.ShardRestoreStatus extends java.lang.Object implements Writeable
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
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
Modifier and Type Method Description booleanequals(java.lang.Object o)inthashCode()java.lang.StringnodeId()Returns node id of the node where shared is getting restoredvoidreadFrom(StreamInput in)Reads restore status from stream inputstatic RestoreInProgress.ShardRestoreStatusreadShardRestoreStatus(StreamInput in)Reads restore status from stream inputjava.lang.Stringreason()Returns failure reasonRestoreInProgress.Statestate()Returns current statevoidwriteTo(StreamOutput out)Writes restore status to stream outputMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
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
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 Details
-
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.IOExceptionReads restore status from stream input- Parameters:
in- stream input- Returns:
- restore status
- Throws:
java.io.IOException
-
readFrom
Reads restore status from stream input- Parameters:
in- stream input- Throws:
java.io.IOException
-
writeTo
Writes restore status to stream output -
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-