org.kuali.maven.wagon
Class S3Utils
java.lang.Object
org.kuali.maven.wagon.S3Utils
public class S3Utils
- extends Object
Method Summary |
static void |
blockingMultiPartUpload(com.amazonaws.services.s3.model.PutObjectRequest request,
com.amazonaws.services.s3.transfer.TransferManager manager)
Use this method to reliably upload large files by splitting it up into manageable chunks and using separate threads to upload each
chunk. |
static void |
upload(File file,
com.amazonaws.services.s3.model.PutObjectRequest request,
com.amazonaws.services.s3.AmazonS3Client client,
com.amazonaws.services.s3.transfer.TransferManager manager)
Upload a single file to Amazon S3. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
S3Utils
public S3Utils()
upload
public static final void upload(File file,
com.amazonaws.services.s3.model.PutObjectRequest request,
com.amazonaws.services.s3.AmazonS3Client client,
com.amazonaws.services.s3.transfer.TransferManager manager)
- Upload a single file to Amazon S3. If the file is larger than 100MB a multi-part upload is used. This splits the file into multiple
smaller chunks with each chunk being uploaded in a different thread. Once all the threads have completed the file is reassembled on
Amazon's side as a single file again.
blockingMultiPartUpload
public static final void blockingMultiPartUpload(com.amazonaws.services.s3.model.PutObjectRequest request,
com.amazonaws.services.s3.transfer.TransferManager manager)
- Use this method to reliably upload large files by splitting it up into manageable chunks and using separate threads to upload each
chunk. Amazon recommends using a multi-part upload on files larger than 100MB. When this method returns all of the upload threads
that handle portions of the file have completed. The file has also been reassembled on Amazon S3 and is ready for use.
Copyright © 2010-2012 The Kuali Foundation. All Rights Reserved.