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.ObjectRepresents 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
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 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-