Class BambooS3TransferManager
- java.lang.Object
-
- com.atlassian.bamboo.build.artifact.BambooS3TransferManager
-
@Internal public class BambooS3TransferManager extends Object
Simple wrapper around Amazon'sTransferManager
that adds some synchronization methods. The supported usage pattern is: first use all copy/upload/download methods, then callwaitForCompletionAndShutdown()
. The object is not supposed to be used afterwaitForCompletionAndShutdown()
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)
seeTransferManager.copy(com.amazonaws.services.s3.model.CopyObjectRequest)
void
download(com.amazonaws.services.s3.model.GetObjectRequest getObjectRequest, File file)
seeTransferManager.download(com.amazonaws.services.s3.model.GetObjectRequest, java.io.File)
void
upload(com.amazonaws.services.s3.model.PutObjectRequest putObjectRequest)
seeTransferManager.upload(com.amazonaws.services.s3.model.PutObjectRequest)
void
waitForCompletionAndShutdown()
Waits for all transfers to complete and shuts down the transfer manager.
-
-
-
Method Detail
-
upload
public void upload(com.amazonaws.services.s3.model.PutObjectRequest putObjectRequest) throws IOException
seeTransferManager.upload(com.amazonaws.services.s3.model.PutObjectRequest)
- Throws:
IOException
-
download
public void download(com.amazonaws.services.s3.model.GetObjectRequest getObjectRequest, File file) throws IOException
seeTransferManager.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
seeTransferManager.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
-
-