Class ChecksumBlobStoreFormat<T extends org.elasticsearch.common.xcontent.ToXContent>

java.lang.Object
org.elasticsearch.repositories.blobstore.ChecksumBlobStoreFormat<T>

public final class ChecksumBlobStoreFormat<T extends org.elasticsearch.common.xcontent.ToXContent> extends Object
Snapshot metadata file format used in v2.0 and above
  • Field Details

    • SNAPSHOT_ONLY_FORMAT_PARAMS

      public static final org.elasticsearch.common.xcontent.ToXContent.Params SNAPSHOT_ONLY_FORMAT_PARAMS
    • VERSION

      public static final int VERSION
      See Also:
      Constant Field Values
  • Constructor Details

  • Method Details

    • read

      public T read(String repoName, BlobContainer blobContainer, String name, org.elasticsearch.common.xcontent.NamedXContentRegistry namedXContentRegistry) throws IOException
      Reads and parses the blob with given name, applying name translation using the {link #blobName} method
      Parameters:
      blobContainer - blob container
      name - name to be translated into
      Returns:
      parsed blob object
      Throws:
      IOException
    • blobName

      public String blobName(String name)
    • deserialize

      public T deserialize(String repoName, org.elasticsearch.common.xcontent.NamedXContentRegistry namedXContentRegistry, InputStream input) throws IOException
      Throws:
      IOException
    • write

      public void write(T obj, BlobContainer blobContainer, String name, boolean compress) throws IOException
      Writes blob with resolving the blob name using blobName(java.lang.String) method.

      The blob will optionally by compressed.

      Parameters:
      obj - object to be serialized
      blobContainer - blob container
      name - blob name
      compress - whether to use compression
      Throws:
      IOException
    • serialize

      public void serialize(T obj, String blobName, boolean compress, OutputStream outputStream) throws IOException
      Throws:
      IOException