Class DefaultFileUpload
- java.lang.Object
-
- software.amazon.awssdk.transfer.s3.internal.model.DefaultFileUpload
-
- All Implemented Interfaces:
FileUpload,ObjectTransfer,Transfer
public final class DefaultFileUpload extends Object implements FileUpload
-
-
Constructor Summary
Constructors Constructor Description DefaultFileUpload(CompletableFuture<CompletedFileUpload> completionFuture, TransferProgress progress, PauseObservable pauseObservable, UploadFileRequest request)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<CompletedFileUpload>completionFuture()booleanequals(Object o)inthashCode()ResumableFileUploadpause()Pauses the current upload operation and return the information that can be used to resume the upload at a later time.TransferProgressprogress()The statefulTransferProgressassociated with this transfer.StringtoString()
-
-
-
Constructor Detail
-
DefaultFileUpload
public DefaultFileUpload(CompletableFuture<CompletedFileUpload> completionFuture, TransferProgress progress, PauseObservable pauseObservable, UploadFileRequest request)
-
-
Method Detail
-
pause
public ResumableFileUpload pause()
Description copied from interface:FileUploadPauses the current upload operation and return the information that can be used to resume the upload at a later time.The information object is serializable for persistent storage until it should be resumed. See
ResumableFileUploadfor supported formats.Currently, it's only supported if the underlying
S3AsyncClientis CRT-based (created viaS3AsyncClient.crtBuilder()orS3AsyncClient.crtCreate()), OR the underlyingS3AsyncClienthas multipart enabled (S3AsyncClientBuilder.multipartConfiguration(MultipartConfiguration)orS3AsyncClientBuilder.multipartEnabled(Boolean)). It will throwUnsupportedOperationExceptionif theS3TransferManageris created with a non CRT-based S3 client (created viaS3AsyncClient.builder()) and does not have multipart configuration enabled.- Specified by:
pausein interfaceFileUpload- Returns:
- A
ResumableFileUploadthat can be used to resume the upload.
-
completionFuture
public CompletableFuture<CompletedFileUpload> completionFuture()
- Specified by:
completionFuturein interfaceFileUpload- Specified by:
completionFuturein interfaceTransfer- Returns:
- The future that will be completed when this transfer is complete.
-
progress
public TransferProgress progress()
Description copied from interface:ObjectTransferThe statefulTransferProgressassociated with this transfer.- Specified by:
progressin interfaceObjectTransfer
-
-