Class CrtFileDownload
java.lang.Object
software.amazon.awssdk.transfer.s3.internal.model.CrtFileDownload
- All Implemented Interfaces:
FileDownload,ObjectTransfer,Transfer
A
FileDownload for a download whose response body is written to the destination file by CRT rather than by an
AsyncResponseTransformer.
Because the response body never passes through the SDK, the response headers are not surfaced until the transfer finishes,
so the ETag and last-modified time needed to resume the download cannot be read from the progress snapshot the way
DefaultFileDownload reads them. They are instead taken from the ResumeToken that CRT hands back when the
meta request is paused.
-
Constructor Summary
ConstructorsConstructorDescriptionCrtFileDownload(CompletableFuture<CompletedFileDownload> completionFuture, TransferProgress progress, S3MetaRequestPauseObservable observable, Supplier<DownloadFileRequest> requestSupplier, ResumableFileDownload resumedDownload) -
Method Summary
Modifier and TypeMethodDescriptionpause()Pause the current download operation and returns the information that can be used to resume the download at a later time.progress()The statefulTransferProgressassociated with this transfer.toString()
-
Constructor Details
-
CrtFileDownload
public CrtFileDownload(CompletableFuture<CompletedFileDownload> completionFuture, TransferProgress progress, S3MetaRequestPauseObservable observable, Supplier<DownloadFileRequest> requestSupplier, ResumableFileDownload resumedDownload)
-
-
Method Details
-
progress
Description copied from interface:ObjectTransferThe statefulTransferProgressassociated with this transfer.- Specified by:
progressin interfaceObjectTransfer
-
completionFuture
- Specified by:
completionFuturein interfaceFileDownload- Specified by:
completionFuturein interfaceTransfer- Returns:
- The future that will be completed when this transfer is complete.
-
pause
Description copied from interface:FileDownloadPause the current download operation and returns the information that can be used to resume the download at a later time.The information object is serializable for persistent storage until it should be resumed. See
ResumableFileDownloadfor supported formats.Pause may block the caller for a short time until in-progress requests are canceled and cleaned up to ensure a consistent state.
- Specified by:
pausein interfaceFileDownload- Returns:
- A
ResumableFileDownloadthat can be used to resume the download.
-
toString
-