Package de.dlr.proseo.storagemgr.s3
Class S3AtomicFileUploaderV2
java.lang.Object
de.dlr.proseo.storagemgr.s3.S3AtomicFileUploaderV2
- All Implemented Interfaces:
AtomicCommand<String>
S3 Atomic Uploader
- Author:
- Denys Chaykovskiy
-
Constructor Summary
ConstructorsConstructorDescriptionS3AtomicFileUploaderV2(software.amazon.awssdk.services.s3.S3AsyncClient s3AsyncClientV2, String bucket, String sourceFile, String targetFileOrDir) Constructor -
Method Summary
-
Constructor Details
-
S3AtomicFileUploaderV2
public S3AtomicFileUploaderV2(software.amazon.awssdk.services.s3.S3AsyncClient s3AsyncClientV2, String bucket, String sourceFile, String targetFileOrDir) Constructor- Parameters:
s3AsyncClientV2- s3 client V2 (asynchronous)bucket- bucketsourceFile- sourceFiletargetFileOrDir- target file or directory
-
-
Method Details
-
execute
Executes upload of the file to s3- Specified by:
executein interfaceAtomicCommand<String>- Returns:
- uploaded file name
- Throws:
IOException- if atomic command was not successful
-
getInfo
Gets information about atomic command (mostly for logs)- Specified by:
getInfoin interfaceAtomicCommand<String>- Returns:
- information about atomic command
-
getCompletedInfo
Gets information about completed atomic command (mostly for logs)- Specified by:
getCompletedInfoin interfaceAtomicCommand<String>- Returns:
- information about completed atomic command
-
getFailedInfo
Gets information about failed atomic command (mostly for logs)- Specified by:
getFailedInfoin interfaceAtomicCommand<String>- Returns:
- information about failed atomic command
-