Class RecoverySource

java.lang.Object
org.elasticsearch.cluster.routing.RecoverySource
All Implemented Interfaces:
Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject
Direct Known Subclasses:
RecoverySource.EmptyStoreRecoverySource, RecoverySource.ExistingStoreRecoverySource, RecoverySource.LocalShardsRecoverySource, RecoverySource.PeerRecoverySource, RecoverySource.SnapshotRecoverySource

public abstract class RecoverySource extends Object implements Writeable, org.elasticsearch.common.xcontent.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
  • Constructor Details

    • RecoverySource

      public RecoverySource()
  • Method Details

    • toXContent

      public final org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      IOException
    • addAdditionalFields

      public void addAdditionalFields(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException
      to be overridden by subclasses
      Throws:
      IOException
    • readFrom

      public static RecoverySource readFrom(StreamInput in) throws IOException
      Throws:
      IOException
    • writeTo

      public final void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • writeAdditionalFields

      protected void writeAdditionalFields(StreamOutput out) throws IOException
      to be overridden by subclasses
      Throws:
      IOException
    • getType

      public abstract RecoverySource.Type getType()
    • shouldBootstrapNewHistoryUUID

      public boolean shouldBootstrapNewHistoryUUID()
    • expectEmptyRetentionLeases

      public boolean expectEmptyRetentionLeases()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object