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 java.lang.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 java.io.IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      java.io.IOException
    • addAdditionalFields

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

      public static RecoverySource readFrom​(StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException
    • writeTo

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

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

      public abstract RecoverySource.Type getType()
    • shouldBootstrapNewHistoryUUID

      public boolean shouldBootstrapNewHistoryUUID()
    • expectEmptyRetentionLeases

      public boolean expectEmptyRetentionLeases()
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object