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 Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classNested 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
ConstructorsConstructorDescriptionRecoveryState(ShardRouting shardRouting, DiscoveryNode targetNode, DiscoveryNode sourceNode)RecoveryState(ShardRouting shardRouting, DiscoveryNode targetNode, DiscoveryNode sourceNode, RecoveryState.Index index)RecoveryState(StreamInput in) - 
Method Summary
Modifier 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.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:
 IOException
 
 - 
 - 
Method Details
- 
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
 writeToin interfaceWriteable- Throws:
 IOException
 - 
getShardId
 - 
getStage
 - 
validateAndSetStage
 - 
validateCurrentStage
 - 
setStage
 - 
setLocalTranslogStage
 - 
setRemoteTranslogStage
 - 
getIndex
 - 
getVerifyIndex
 - 
getTranslog
 - 
getTimer
 - 
getRecoverySource
 - 
getSourceNode
Returns recovery source node (only non-null if peer recovery) - 
getTargetNode
 - 
getPrimary
public boolean getPrimary() - 
readRecoveryState
- Throws:
 IOException
 - 
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
 toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
 IOException
 
 -