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 Object
implements org.elasticsearch.common.xcontent.ToXContentFragment, Writeable
Keeps track of state related to shard recovery.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContentorg.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.WriteableWriteable.Reader<V>, Writeable.Writer<V>
- 
Field SummaryFields inherited from interface org.elasticsearch.common.xcontent.ToXContentEMPTY_PARAMS
- 
Constructor SummaryConstructorsConstructorDescriptionRecoveryState(ShardRouting shardRouting, DiscoveryNode targetNode, DiscoveryNode sourceNode)RecoveryState(ShardRouting shardRouting, DiscoveryNode targetNode, DiscoveryNode sourceNode, RecoveryState.Index index)RecoveryState(StreamInput in)
- 
Method SummaryModifier and TypeMethodDescriptiongetIndex()booleanReturns recovery source node (only non-null if peer recovery)getStage()getTimer()static 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragmentisFragment
- 
Constructor Details- 
RecoveryStatepublic RecoveryState(ShardRouting shardRouting, DiscoveryNode targetNode, @Nullable DiscoveryNode sourceNode)
- 
RecoveryStatepublic RecoveryState(ShardRouting shardRouting, DiscoveryNode targetNode, @Nullable DiscoveryNode sourceNode, RecoveryState.Index index)
- 
RecoveryState- Throws:
- IOException
 
 
- 
- 
Method Details- 
writeToDescription copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
- writeToin interface- Writeable
- Throws:
- IOException
 
- 
getShardId
- 
getStage
- 
validateAndSetStage
- 
validateCurrentStage
- 
setStage
- 
setLocalTranslogStage
- 
setRemoteTranslogStage
- 
getIndex
- 
getVerifyIndex
- 
getTranslog
- 
getTimer
- 
getRecoverySource
- 
getSourceNodeReturns recovery source node (only non-null if peer recovery)
- 
getTargetNode
- 
getPrimarypublic boolean getPrimary()
- 
readRecoveryState- Throws:
- IOException
 
- 
toXContentpublic org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
- toXContentin interface- org.elasticsearch.common.xcontent.ToXContent
- Throws:
- IOException
 
 
-