Class RecoverySource
java.lang.Object
org.elasticsearch.cluster.routing.RecoverySource
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
- Direct Known Subclasses:
RecoverySource.EmptyStoreRecoverySource,RecoverySource.ExistingStoreRecoverySource,RecoverySource.LocalShardsRecoverySource,RecoverySource.PeerRecoverySource,RecoverySource.SnapshotRecoverySource
public abstract class RecoverySource extends java.lang.Object implements Writeable, ToXContentObject
Represents the recovery source of a shard. Available recovery types are:
-
RecoverySource.EmptyStoreRecoverySource recovery from an empty store
- RecoverySource.ExistingStoreRecoverySource recovery from an existing store
- RecoverySource.PeerRecoverySource recovery from a primary on another node
- RecoverySource.SnapshotRecoverySource recovery from a snapshot
- RecoverySource.LocalShardsRecoverySource recovery from other shards of another index on the same node-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRecoverySource.EmptyStoreRecoverySourceRecovery from a fresh copystatic classRecoverySource.ExistingStoreRecoverySourceRecovery from an existing on-disk storestatic classRecoverySource.LocalShardsRecoverySourcerecovery from other shards on same node (shrink index action)static classRecoverySource.PeerRecoverySourcepeer recovery from a primary shardstatic classRecoverySource.SnapshotRecoverySourcerecovery from a snapshotstatic classRecoverySource.TypeNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
-
Constructor Summary
Constructors Constructor Description RecoverySource() -
Method Summary
Modifier and Type Method Description voidaddAdditionalFields(XContentBuilder builder, ToXContent.Params params)to be overridden by subclassesbooleanequals(java.lang.Object o)booleanexpectEmptyRetentionLeases()abstract RecoverySource.TypegetType()inthashCode()static RecoverySourcereadFrom(StreamInput in)booleanshouldBootstrapNewHistoryUUID()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)protected voidwriteAdditionalFields(StreamOutput out)to be overridden by subclassesvoidwriteTo(StreamOutput out)Write this into the StreamOutput.
-
Constructor Details
-
RecoverySource
public RecoverySource()
-
-
Method Details
-
toXContent
public final XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
addAdditionalFields
public void addAdditionalFields(XContentBuilder builder, ToXContent.Params params) throws java.io.IOExceptionto be overridden by subclasses- Throws:
java.io.IOException
-
readFrom
- Throws:
java.io.IOException
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput. -
writeAdditionalFields
to be overridden by subclasses- Throws:
java.io.IOException
-
getType
-
shouldBootstrapNewHistoryUUID
public boolean shouldBootstrapNewHistoryUUID() -
expectEmptyRetentionLeases
public boolean expectEmptyRetentionLeases() -
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-