Class S3AtomicFileSizeGetter

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

public class S3AtomicFileSizeGetter extends Object implements AtomicCommand<String>
S3 Atomic File Size Getter
Author:
Denys Chaykovskiy
  • Constructor Details

    • S3AtomicFileSizeGetter

      public S3AtomicFileSizeGetter(software.amazon.awssdk.services.s3.S3Client s3Client, String bucket, String path)
      Constructor
      Parameters:
      s3Client - s3 client
      bucket - bucket
      path - path
  • Method Details

    • execute

      public String execute() throws IOException
      Gets if file exists
      Specified by:
      execute in interface AtomicCommand<String>
      Returns:
      "true" if file exists
      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