public class TransferManagerUtils extends Object
构造器和说明 |
---|
TransferManagerUtils() |
限定符和类型 | 方法和说明 |
---|---|
static long |
calculateOptimalPartSize(PutObjectRequest putObjectRequest,
TransferManagerConfiguration configuration)
Returns the optimal part size, in bytes, for each individual part upload
in a multipart upload.
|
static ThreadPoolExecutor |
createDefaultExecutorService()
Returns a new thread pool configured with the default settings.
|
static long |
getContentLength(PutObjectRequest putObjectRequest)
Returns the size of the data in this request, otherwise -1 if the content
length is unknown.
|
static File |
getRequestFile(PutObjectRequest putObjectRequest)
Convenience method for getting the file specified in a request.
|
static boolean |
isUploadParallelizable(PutObjectRequest putObjectRequest,
boolean isUsingEncryption)
Returns true if the specified upload request can use parallel part
uploads for increased performance.
|
static boolean |
shouldUseMultipartUpload(PutObjectRequest putObjectRequest,
TransferManagerConfiguration configuration)
Returns true if the the specified request should be processed as a
multipart upload (instead of a single part upload).
|
public static ThreadPoolExecutor createDefaultExecutorService()
public static boolean isUploadParallelizable(PutObjectRequest putObjectRequest, boolean isUsingEncryption)
putObjectRequest
- The request to check.isUsingEncryption
- True if the upload is an encrypted upload, otherwise false.public static long getContentLength(PutObjectRequest putObjectRequest)
putObjectRequest
- The request to check.public static long calculateOptimalPartSize(PutObjectRequest putObjectRequest, TransferManagerConfiguration configuration)
putObjectRequest
- The request containing all the details of the upload.configuration
- Configuration values to use when calculating size.public static boolean shouldUseMultipartUpload(PutObjectRequest putObjectRequest, TransferManagerConfiguration configuration)
putObjectRequest
- The request containing all the details of the upload.configuration
- Configuration settings controlling how transfer manager
processes requests.public static File getRequestFile(PutObjectRequest putObjectRequest)
Copyright © 2016. All rights reserved.