Class RecoveryState
java.lang.Object
org.elasticsearch.indices.recovery.RecoveryState
- All Implemented Interfaces:
Writeable,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentFragment
public class RecoveryState extends java.lang.Object implements org.elasticsearch.common.xcontent.ToXContentFragment, Writeable
Keeps track of state related to shard recovery.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRecoveryState.FileDetailstatic classRecoveryState.Indexstatic classRecoveryState.RecoveryFilesDetailsstatic classRecoveryState.Stagestatic classRecoveryState.Timerstatic classRecoveryState.Translogstatic classRecoveryState.VerifyIndexNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
Constructors Constructor Description RecoveryState(ShardRouting shardRouting, DiscoveryNode targetNode, DiscoveryNode sourceNode)RecoveryState(ShardRouting shardRouting, DiscoveryNode targetNode, DiscoveryNode sourceNode, RecoveryState.Index index)RecoveryState(StreamInput in) -
Method Summary
Modifier and Type Method Description RecoveryState.IndexgetIndex()booleangetPrimary()RecoverySourcegetRecoverySource()ShardIdgetShardId()DiscoveryNodegetSourceNode()Returns recovery source node (only non-null if peer recovery)RecoveryState.StagegetStage()DiscoveryNodegetTargetNode()RecoveryState.TimergetTimer()RecoveryState.TransloggetTranslog()RecoveryState.VerifyIndexgetVerifyIndex()static RecoveryStatereadRecoveryState(StreamInput in)RecoveryStatesetStage(RecoveryState.Stage stage)org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)protected voidvalidateAndSetStage(RecoveryState.Stage expected, RecoveryState.Stage next)voidvalidateCurrentStage(RecoveryState.Stage expected)voidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
Constructor Details
-
RecoveryState
public RecoveryState(ShardRouting shardRouting, DiscoveryNode targetNode, @Nullable DiscoveryNode sourceNode) -
RecoveryState
public RecoveryState(ShardRouting shardRouting, DiscoveryNode targetNode, @Nullable DiscoveryNode sourceNode, RecoveryState.Index index) -
RecoveryState
- Throws:
java.io.IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput. -
getShardId
-
getStage
-
validateAndSetStage
-
validateCurrentStage
-
setStage
-
getIndex
-
getVerifyIndex
-
getTranslog
-
getTimer
-
getRecoverySource
-
getSourceNode
Returns recovery source node (only non-null if peer recovery) -
getTargetNode
-
getPrimary
public boolean getPrimary() -
readRecoveryState
- Throws:
java.io.IOException
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
java.io.IOException
-