Class 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

      All Methods Instance Methods Concrete Methods 
      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 waitForCompletionAndShutdown()
      Waits for all transfers to complete and shuts down the transfer manager.
    • Constructor Detail

      • BambooS3TransferManager

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

      • 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