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 TypeMethodDescriptionDownloads a snapshot archive from remote storage.booleanChecks whether a snapshot with the given ID exists in remote storage.voidupload(String snapshotId, InputStream data) Uploads a snapshot archive to remote storage.
-
Method Details
-
upload
Uploads a snapshot archive to remote storage.- Parameters:
snapshotId- unique identifier for this snapshotdata- the workspace tar archive stream to upload- Throws:
Exception- if the upload fails
-
download
Downloads a snapshot archive from remote storage.- Parameters:
snapshotId- unique identifier for the snapshot to download- Returns:
- an
InputStreamover the downloaded tar archive - Throws:
Exception- if the download fails or the snapshot does not exist
-
exists
Checks whether a snapshot with the given ID exists in remote storage.- Parameters:
snapshotId- unique identifier to check- Returns:
trueif the snapshot exists and can be downloaded- Throws:
Exception- if the check fails
-