Interface RemoteSnapshotClient


public interface RemoteSnapshotClient
User-implemented interface for uploading and downloading snapshot archives to/from remote storage (e.g. S3, OSS, GCS, or a custom blob store).

Implement this interface and pass it to RemoteSnapshotSpec to enable remote snapshot storage. The implementation is responsible for authentication, retry logic, and connection management.

  • Method Summary

    Modifier and Type
    Method
    Description
    download(String snapshotId)
    Downloads a snapshot archive from remote storage.
    boolean
    exists(String snapshotId)
    Checks whether a snapshot with the given ID exists in remote storage.
    void
    upload(String snapshotId, InputStream data)
    Uploads a snapshot archive to remote storage.
  • Method Details

    • upload

      void upload(String snapshotId, InputStream data) throws Exception
      Uploads a snapshot archive to remote storage.
      Parameters:
      snapshotId - unique identifier for this snapshot
      data - the workspace tar archive stream to upload
      Throws:
      Exception - if the upload fails
    • download

      InputStream download(String snapshotId) throws Exception
      Downloads a snapshot archive from remote storage.
      Parameters:
      snapshotId - unique identifier for the snapshot to download
      Returns:
      an InputStream over the downloaded tar archive
      Throws:
      Exception - if the download fails or the snapshot does not exist
    • exists

      boolean exists(String snapshotId) throws Exception
      Checks whether a snapshot with the given ID exists in remote storage.
      Parameters:
      snapshotId - unique identifier to check
      Returns:
      true if the snapshot exists and can be downloaded
      Throws:
      Exception - if the check fails