Class S3AtomicFileDownloaderV2

java.lang.Object
de.dlr.proseo.storagemgr.s3.S3AtomicFileDownloaderV2
All Implemented Interfaces:
AtomicCommand<String>

public class S3AtomicFileDownloaderV2 extends Object implements AtomicCommand<String>
S3 Atomic File Downloader
Author:
Denys Chaykovskiy
  • Constructor Details

    • S3AtomicFileDownloaderV2

      public S3AtomicFileDownloaderV2(software.amazon.awssdk.services.s3.S3AsyncClient s3AsyncClientV2, String bucket, String sourceFile, String targetFileOrDir, long maxCycles, long waitTime)
      Constructor
      Parameters:
      s3AsyncClientV2 - s3 client V2 (asynchronous)
      bucket - bucket
      sourceFile - sourceFile
      targetFileOrDir - target file or directory
      maxCycles - max cycles
      waitTime - wait time
  • Method Details

    • execute

      public String execute() throws IOException
      Executes download of the file to s3
      Specified by:
      execute in interface AtomicCommand<String>
      Returns:
      downloaded file name
      Throws:
      IOException - if atomic command was not successful
    • getInfo

      public String getInfo()
      Gets information about atomic command (mostly for logs)
      Specified by:
      getInfo in interface AtomicCommand<String>
      Returns:
      information about atomic command
    • getCompletedInfo

      public String getCompletedInfo()
      Gets information about completed atomic command (mostly for logs)
      Specified by:
      getCompletedInfo in interface AtomicCommand<String>
      Returns:
      information about completed atomic command
    • getFailedInfo

      public String getFailedInfo()
      Gets information about failed atomic command (mostly for logs)
      Specified by:
      getFailedInfo in interface AtomicCommand<String>
      Returns:
      information about failed atomic command