Class Snapshot

java.lang.Object
org.elasticsearch.snapshots.Snapshot
All Implemented Interfaces:
Writeable

public final class Snapshot
extends java.lang.Object
implements Writeable
Basic information about a snapshot - a SnapshotId and the repository that the snapshot belongs to.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable

    Writeable.Reader<V>, Writeable.Writer<V>
  • Constructor Summary

    Constructors 
    Constructor Description
    Snapshot​(java.lang.String repository, SnapshotId snapshotId)
    Constructs a snapshot.
    Snapshot​(StreamInput in)
    Constructs a snapshot from the stream input.
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object o)  
    java.lang.String getRepository()
    Gets the repository name for the snapshot.
    SnapshotId getSnapshotId()
    Gets the snapshot id for the snapshot.
    int hashCode()  
    java.lang.String toString()  
    void writeTo​(StreamOutput out)
    Write this into the StreamOutput.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Snapshot

      public Snapshot​(java.lang.String repository, SnapshotId snapshotId)
      Constructs a snapshot.
    • Snapshot

      public Snapshot​(StreamInput in) throws java.io.IOException
      Constructs a snapshot from the stream input.
      Throws:
      java.io.IOException
  • Method Details

    • getRepository

      public java.lang.String getRepository()
      Gets the repository name for the snapshot.
    • getSnapshotId

      public SnapshotId getSnapshotId()
      Gets the snapshot id for the snapshot.
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • 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
    • writeTo

      public 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