Class BambooS3TransferManager

java.lang.Object
com.atlassian.bamboo.build.artifact.BambooS3TransferManager

@Internal public class BambooS3TransferManager extends Object
Simple wrapper around Amazon's TransferManager that adds some synchronization methods. The supported usage pattern is: first use all copy/upload/download methods, then call waitForCompletionAndShutdown(). The object is not supposed to be used after waitForCompletionAndShutdown() has been called.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BambooS3TransferManager(com.amazonaws.services.s3.AmazonS3 s3Client)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    copy(com.amazonaws.services.s3.model.CopyObjectRequest copyObjectRequest)
    see TransferManager.copy(com.amazonaws.services.s3.model.CopyObjectRequest)
    void
    download(com.amazonaws.services.s3.model.GetObjectRequest getObjectRequest, File file)
    see TransferManager.download(com.amazonaws.services.s3.model.GetObjectRequest, java.io.File)
    void
    upload(com.amazonaws.services.s3.model.PutObjectRequest putObjectRequest)
    see TransferManager.upload(com.amazonaws.services.s3.model.PutObjectRequest)
    void
    Waits for all transfers to complete and shuts down the transfer manager.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BambooS3TransferManager

      public BambooS3TransferManager(com.amazonaws.services.s3.AmazonS3 s3Client)
  • Method Details

    • upload

      public void upload(com.amazonaws.services.s3.model.PutObjectRequest putObjectRequest) throws IOException
      see TransferManager.upload(com.amazonaws.services.s3.model.PutObjectRequest)
      Throws:
      IOException
    • download

      public void download(com.amazonaws.services.s3.model.GetObjectRequest getObjectRequest, File file) throws IOException
      see TransferManager.download(com.amazonaws.services.s3.model.GetObjectRequest, java.io.File)
      Throws:
      IOException
    • copy

      public void copy(com.amazonaws.services.s3.model.CopyObjectRequest copyObjectRequest) throws IOException
      see TransferManager.copy(com.amazonaws.services.s3.model.CopyObjectRequest)
      Throws:
      IOException
    • waitForCompletionAndShutdown

      public void waitForCompletionAndShutdown() throws IOException
      Waits for all transfers to complete and shuts down the transfer manager. The underlying S3 client is not shut down.
      Throws:
      IOException