SimpleThreadedStorageService
instead.@Deprecated
public class S3ServiceSimpleMulti
extends java.lang.Object
S3Service
implementation.
This class provides a simplified interface to the S3ServiceMulti
service. It will block while
doing its work, return the results of an operation when it is finished, and throw an exception if
anything goes wrong.
For a non-blocking multi-threading service that is more powerful, but also more complicated,
see S3ServiceMulti
.
Constructor and Description |
---|
S3ServiceSimpleMulti(S3Service s3Service)
Deprecated.
Construct a multi-threaded service based on an S3Service.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map[] |
copyObjects(java.lang.String sourceBucketName,
java.lang.String destinationBucketName,
java.lang.String[] sourceObjectKeys,
S3Object[] destinationObjects,
boolean replaceMetadata)
Deprecated.
Copies multiple objects within or between buckets.
|
S3Bucket[] |
createBuckets(S3Bucket[] buckets)
Deprecated.
Creates multiple buckets.
|
void |
deleteObjects(S3Bucket bucket,
S3Object[] objects)
Deprecated.
Deletes multiple objects
|
void |
deleteVersionsOfObject(java.lang.String[] versionIds,
java.lang.String bucketName,
java.lang.String objectKey)
Deprecated.
Deletes multiple versions.
|
void |
deleteVersionsOfObjectWithMFA(java.lang.String[] versionIds,
java.lang.String multiFactorSerialNumber,
java.lang.String multiFactorAuthCode,
java.lang.String bucketName,
java.lang.String objectKey)
Deprecated.
Deletes multiple versions.
|
void |
downloadObjects(S3Bucket bucket,
DownloadPackage[] downloadPackages)
Deprecated.
A convenience method to download multiple objects from S3 to pre-existing output streams, which
is particularly useful for downloading objects to files.
|
S3Object[] |
getObjectACLs(S3Bucket bucket,
S3Object[] objects)
Deprecated.
Retrieves Access Control List (ACL) settings for multiple objects.
|
S3Object[] |
getObjects(S3Bucket bucket,
S3Object[] objects)
Deprecated.
Retrieves multiple objects (including details and data).
|
S3Object[] |
getObjects(S3Bucket bucket,
java.lang.String[] objectKeys)
Deprecated.
Retrieves multiple objects (including details and data).
|
S3Object[] |
getObjectsHeads(S3Bucket bucket,
S3Object[] objects)
Deprecated.
Retrieves details of multiple objects (details only, no data)
|
S3Object[] |
getObjectsHeads(S3Bucket bucket,
java.lang.String[] objectKeys)
Deprecated.
Retrieves details of multiple objects (details only, no data)
|
S3Object[] |
putACLs(S3Bucket bucket,
S3Object[] objects)
Deprecated.
Updates/sets Access Control List (ACL) settings for multiple objects.
|
S3Object[] |
putObjects(S3Bucket bucket,
S3Object[] objects)
Deprecated.
Creates/uploads multiple objects.
|
protected void |
throwError(S3ServiceEventAdaptor adaptor)
Deprecated.
Utility method to check an
S3ServiceEventAdaptor for the occurrence of an error, and if
one is present to throw it. |
public S3ServiceSimpleMulti(S3Service s3Service)
s3Service
- an S3Service implementation that will be used to perform S3 requests. This implementation
must be thread-safe.protected void throwError(S3ServiceEventAdaptor adaptor) throws S3ServiceException
S3ServiceEventAdaptor
for the occurrence of an error, and if
one is present to throw it.adaptor
- S3ServiceException
public S3Bucket[] createBuckets(S3Bucket[] buckets) throws S3ServiceException
buckets
- the buckets to create.S3ServiceException
public S3Object[] putObjects(S3Bucket bucket, S3Object[] objects) throws S3ServiceException
bucket
- the bucket to create the objects in.objects
- the objects to create/upload.S3ServiceException
public java.util.Map[] copyObjects(java.lang.String sourceBucketName, java.lang.String destinationBucketName, java.lang.String[] sourceObjectKeys, S3Object[] destinationObjects, boolean replaceMetadata) throws S3ServiceException
sourceBucketName
- the name of the bucket containing the objects that will be copied.destinationBucketName
- the name of the bucket to which the objects will be copied. The destination
bucket may be the same as the source bucket.sourceObjectKeys
- the key names of the objects that will be copied.destinationObjects
- objects that will be created by the copy operation. The AccessControlList
setting of each object will determine the access permissions of the
resultant object, and if the replaceMetadata flag is true the metadata
items in each object will also be applied to the resultant object.replaceMetadata
- if true, the metadata items in the destination objects will be stored
in S3 by using the REPLACE metadata copying option. If false, the metadata
items will be copied unchanged from the original objects using the COPY
metadata copying option.sS3ServiceException
public void deleteObjects(S3Bucket bucket, S3Object[] objects) throws S3ServiceException
bucket
- the bucket containing the objects to delete.objects
- the objects to delete.S3ServiceException
public void deleteVersionsOfObjectWithMFA(java.lang.String[] versionIds, java.lang.String multiFactorSerialNumber, java.lang.String multiFactorAuthCode, java.lang.String bucketName, java.lang.String objectKey) throws S3ServiceException
versionIds
- the identifiers of the object versions that will be deleted.multiFactorSerialNumber
- the serial number for a multi-factor authentication device.multiFactorAuthCode
- a multi-factor authentication code generated by a device.bucketName
- the name of the versioned bucket containing the object to be deleted.objectKey
- the key representing the object in S3.S3ServiceException
public void deleteVersionsOfObject(java.lang.String[] versionIds, java.lang.String bucketName, java.lang.String objectKey) throws S3ServiceException
versionIds
- the identifiers of the object versions that will be deleted.bucketName
- the name of the versioned bucket containing the object to be deleted.objectKey
- the key representing the object in S3.S3ServiceException
public S3Object[] getObjects(S3Bucket bucket, S3Object[] objects) throws S3ServiceException
StorageObject.getDataInputStream()
.bucket
- the bucket containing the objects.objects
- the objects to retrieve.S3ServiceException
public S3Object[] getObjects(S3Bucket bucket, java.lang.String[] objectKeys) throws S3ServiceException
StorageObject.getDataInputStream()
.bucket
- the bucket containing the objects.objectKeys
- the key names of the objects to retrieve.S3ServiceException
public S3Object[] getObjectsHeads(S3Bucket bucket, S3Object[] objects) throws S3ServiceException
bucket
- the bucket containing the objects.objects
- the objects to retrieve.S3ServiceException
public S3Object[] getObjectsHeads(S3Bucket bucket, java.lang.String[] objectKeys) throws S3ServiceException
bucket
- the bucket containing the objects.objectKeys
- the key names of the objects to retrieve.S3ServiceException
public S3Object[] getObjectACLs(S3Bucket bucket, S3Object[] objects) throws S3ServiceException
bucket
- the bucket containing the objects.objects
- the objects whose ACLs will be retrieved.S3ServiceException
public S3Object[] putACLs(S3Bucket bucket, S3Object[] objects) throws S3ServiceException
bucket
- the bucket containing the objects.objects
- objects containing ACL settings that will be updated/set.S3ServiceException
public void downloadObjects(S3Bucket bucket, DownloadPackage[] downloadPackages) throws S3ServiceException
bucket
- the bucket containing the objectsdownloadPackages
- an array of download package objects that manage the output of data for an S3Object.S3ServiceException