Class BlobStoreIndexShardSnapshot

java.lang.Object
org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshot
All Implemented Interfaces:
org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentFragment

public class BlobStoreIndexShardSnapshot extends Object implements org.elasticsearch.xcontent.ToXContentFragment
Shard snapshot metadata
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Information about snapshotted file

    Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent

    org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params
  • Field Summary

    Fields inherited from interface org.elasticsearch.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlobStoreIndexShardSnapshot(String snapshot, long indexVersion, List<BlobStoreIndexShardSnapshot.FileInfo> indexFiles, long startTime, long time, int incrementalFileCount, long incrementalSize)
    Constructs new shard snapshot metadata from snapshot metadata
  • Method Summary

    Modifier and Type
    Method
    Description
    asClone(String targetSnapshotName, long startTime, long time)
    Creates a new instance has a different name and zero incremental file counts but is identical to this instance in terms of the files it references.
    fromXContent(org.elasticsearch.xcontent.XContentParser parser)
    Parses shard snapshot metadata
    int
    Returns incremental of files that were snapshotted
    long
    Returns incremental of files size that were snapshotted
    Returns list of files in the shard
    Returns snapshot name
    long
    Returns snapshot start time
    long
    Returns snapshot running time
    int
    Returns total number of files that are referenced by this snapshot
    long
    Returns total size of all files that where snapshotted
    static long
     
    org.elasticsearch.xcontent.XContentBuilder
    toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params)
    Serializes shard snapshot metadata info into JSON

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment

    isFragment
  • Constructor Details

    • BlobStoreIndexShardSnapshot

      public BlobStoreIndexShardSnapshot(String snapshot, long indexVersion, List<BlobStoreIndexShardSnapshot.FileInfo> indexFiles, long startTime, long time, int incrementalFileCount, long incrementalSize)
      Constructs new shard snapshot metadata from snapshot metadata
      Parameters:
      snapshot - snapshot name
      indexVersion - index version
      indexFiles - list of files in the shard
      startTime - snapshot start time
      time - snapshot running time
      incrementalFileCount - incremental of files that were snapshotted
      incrementalSize - incremental size of snapshot
  • Method Details

    • asClone

      public BlobStoreIndexShardSnapshot asClone(String targetSnapshotName, long startTime, long time)
      Creates a new instance has a different name and zero incremental file counts but is identical to this instance in terms of the files it references.
      Parameters:
      targetSnapshotName - target snapshot name
      startTime - time the clone operation on the repository was started
      time - time it took to create the clone
    • snapshot

      public String snapshot()
      Returns snapshot name
      Returns:
      snapshot name
    • indexFiles

      Returns list of files in the shard
      Returns:
      list of files
    • startTime

      public long startTime()
      Returns snapshot start time
    • time

      public long time()
      Returns snapshot running time
    • incrementalFileCount

      public int incrementalFileCount()
      Returns incremental of files that were snapshotted
    • totalFileCount

      public int totalFileCount()
      Returns total number of files that are referenced by this snapshot
    • incrementalSize

      public long incrementalSize()
      Returns incremental of files size that were snapshotted
    • totalSize

      public long totalSize()
      Returns total size of all files that where snapshotted
    • totalSize

      public static long totalSize(List<BlobStoreIndexShardSnapshot.FileInfo> indexFiles)
    • toXContent

      public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Serializes shard snapshot metadata info into JSON
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Parameters:
      builder - XContent builder
      params - parameters
      Throws:
      IOException
    • fromXContent

      public static BlobStoreIndexShardSnapshot fromXContent(org.elasticsearch.xcontent.XContentParser parser) throws IOException
      Parses shard snapshot metadata
      Parameters:
      parser - parser
      Returns:
      shard snapshot metadata
      Throws:
      IOException