Class BambooS3TransferManager
java.lang.Object
com.atlassian.bamboo.build.artifact.BambooS3TransferManager
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
copy
(com.amazonaws.services.s3.model.CopyObjectRequest copyObjectRequest) seeTransferManager.copy(com.amazonaws.services.s3.model.CopyObjectRequest)
void
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
Waits for all transfers to complete and shuts down the transfer manager.
-
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 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
Waits for all transfers to complete and shuts down the transfer manager. The underlying S3 client is not shut down.- Throws:
IOException
-