public class DefaultAmazonS3Operations extends AbstractAmazonS3Operations
AmazonS3Operations that is implemented
using AWS SDK.logger, PATH_SEPARATORCONTENT_MD5_HEADER| Constructor and Description |
|---|
DefaultAmazonS3Operations(AWSCredentials credentials)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected AmazonS3Object |
doGetObject(java.lang.String bucketName,
java.lang.String key)
Gets the object from the given bucket with the given key using the AWS SDK implementation
|
protected PaginatedObjectsView |
doListObjects(java.lang.String bucketName,
java.lang.String nextMarker,
int pageSize,
java.lang.String prefix)
The implementation that uses the AWS SDK to list objects from the given bucket
|
void |
doPut(java.lang.String bucketName,
java.lang.String key,
java.io.File file,
AmazonS3ObjectACL objectACL,
java.util.Map<java.lang.String,java.lang.String> userMetadata,
java.lang.String stringContentMD5)
The implementation puts the given
File instance to the provided bucket against
the given key. |
java.util.concurrent.ThreadPoolExecutor |
getThreadPoolExecutor()
Gets the thread pool executor that will be used to upload the object in multiparts
concurrently
|
protected void |
init()
The subclass needs to override this method if it desires to perform any initializing
of the class
|
void |
setThreadPoolExecutor(java.util.concurrent.ThreadPoolExecutor threadPoolExecutor)
Used only when we upload the data using multi part upload.
|
afterPropertiesSet, getAwsEndpoint, getMultipartUploadThreshold, getObject, getTemporaryDirectory, getTemporaryFileSuffix, listObjects, putObject, removeObject, setAwsEndpoint, setMultipartUploadThreshold, setTemporaryDirectory, setTemporaryDirectory, setTemporaryFileSuffixpublic DefaultAmazonS3Operations(AWSCredentials credentials)
credentials - protected void init()
AbstractAmazonS3Operationsinit in class AbstractAmazonS3Operationsprotected PaginatedObjectsView doListObjects(java.lang.String bucketName, java.lang.String nextMarker, int pageSize, java.lang.String prefix)
doListObjects in class AbstractAmazonS3OperationsbucketName - The bucket in which we want to list the objects innextMarker - The number of objects can be very large and this serves as the marker
for remembering the last record fetch in the last retrieve operation.pageSize - The max number of records to be retrieved in one list object operation.prefix - The prefix for the list operation, this can serve as the folder whose contents
are to be listed.protected AmazonS3Object doGetObject(java.lang.String bucketName, java.lang.String key)
doGetObject in class AbstractAmazonS3OperationsbucketName - key - public void doPut(java.lang.String bucketName,
java.lang.String key,
java.io.File file,
AmazonS3ObjectACL objectACL,
java.util.Map<java.lang.String,java.lang.String> userMetadata,
java.lang.String stringContentMD5)
File instance to the provided bucket against
the given key.doPut in class AbstractAmazonS3OperationsbucketName - The bucket on S3 where this object is to be putkey - The key against which this Object is to be stored in S3file - resource to be uploaded to S3objectACL - the Object's Access controls for the object to be uploadeduserMetadata - The user's metadata to be associated with the object uploadedstringContentMD5 - The MD5 sum of the contents of the file to be uploadedpublic java.util.concurrent.ThreadPoolExecutor getThreadPoolExecutor()
public void setThreadPoolExecutor(java.util.concurrent.ThreadPoolExecutor threadPoolExecutor)
threadPoolExecutor - May not be null