org.jets3t.service.multithread
Class S3ServiceSimpleMulti

java.lang.Object
  extended by org.jets3t.service.multithread.S3ServiceSimpleMulti

Deprecated. 0.8.0 use SimpleThreadedStorageService instead.

@Deprecated
public class S3ServiceSimpleMulti
extends java.lang.Object

S3 service wrapper that performs multiple S3 requests at a time using multi-threading and an underlying thread-safe 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 Summary
S3ServiceSimpleMulti(S3Service s3Service)
          Deprecated. Construct a multi-threaded service based on an S3Service.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

S3ServiceSimpleMulti

public S3ServiceSimpleMulti(S3Service s3Service)
Deprecated. 
Construct a multi-threaded service based on an S3Service.

Parameters:
s3Service - an S3Service implementation that will be used to perform S3 requests. This implementation must be thread-safe.
Method Detail

throwError

protected void throwError(S3ServiceEventAdaptor adaptor)
                   throws S3ServiceException
Deprecated. 
Utility method to check an S3ServiceEventAdaptor for the occurrence of an error, and if one is present to throw it.

Parameters:
adaptor -
Throws:
S3ServiceException

createBuckets

public S3Bucket[] createBuckets(S3Bucket[] buckets)
                         throws S3ServiceException
Deprecated. 
Creates multiple buckets.

Parameters:
buckets - the buckets to create.
Returns:
the created buckets.
Throws:
S3ServiceException

putObjects

public S3Object[] putObjects(S3Bucket bucket,
                             S3Object[] objects)
                      throws S3ServiceException
Deprecated. 
Creates/uploads multiple objects.

Parameters:
bucket - the bucket to create the objects in.
objects - the objects to create/upload.
Returns:
the created/uploaded objects.
Throws:
S3ServiceException

copyObjects

public java.util.Map[] copyObjects(java.lang.String sourceBucketName,
                                   java.lang.String destinationBucketName,
                                   java.lang.String[] sourceObjectKeys,
                                   S3Object[] destinationObjects,
                                   boolean replaceMetadata)
                            throws S3ServiceException
Deprecated. 
Copies multiple objects within or between buckets.

Parameters:
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.s
Throws:
S3ServiceException

deleteObjects

public void deleteObjects(S3Bucket bucket,
                          S3Object[] objects)
                   throws S3ServiceException
Deprecated. 
Deletes multiple objects

Parameters:
bucket - the bucket containing the objects to delete.
objects - the objects to delete.
Throws:
S3ServiceException

deleteVersionsOfObjectWithMFA

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
Deprecated. 
Deletes multiple versions.

Parameters:
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.
Throws:
S3ServiceException

deleteVersionsOfObject

public void deleteVersionsOfObject(java.lang.String[] versionIds,
                                   java.lang.String bucketName,
                                   java.lang.String objectKey)
                            throws S3ServiceException
Deprecated. 
Deletes multiple versions.

Parameters:
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.
Throws:
S3ServiceException

getObjects

public S3Object[] getObjects(S3Bucket bucket,
                             S3Object[] objects)
                      throws S3ServiceException
Deprecated. 
Retrieves multiple objects (including details and data). The objects' data will be stored in temporary files, and can be retrieved using StorageObject.getDataInputStream().

Parameters:
bucket - the bucket containing the objects.
objects - the objects to retrieve.
Returns:
the retrieved objects.
Throws:
S3ServiceException

getObjects

public S3Object[] getObjects(S3Bucket bucket,
                             java.lang.String[] objectKeys)
                      throws S3ServiceException
Deprecated. 
Retrieves multiple objects (including details and data). The objects' data will be stored in temporary files, and can be retrieved using StorageObject.getDataInputStream().

Parameters:
bucket - the bucket containing the objects.
objectKeys - the key names of the objects to retrieve.
Returns:
the retrieved objects.
Throws:
S3ServiceException

getObjectsHeads

public S3Object[] getObjectsHeads(S3Bucket bucket,
                                  S3Object[] objects)
                           throws S3ServiceException
Deprecated. 
Retrieves details of multiple objects (details only, no data)

Parameters:
bucket - the bucket containing the objects.
objects - the objects to retrieve.
Returns:
objects populated with the details retrieved.
Throws:
S3ServiceException

getObjectsHeads

public S3Object[] getObjectsHeads(S3Bucket bucket,
                                  java.lang.String[] objectKeys)
                           throws S3ServiceException
Deprecated. 
Retrieves details of multiple objects (details only, no data)

Parameters:
bucket - the bucket containing the objects.
objectKeys - the key names of the objects to retrieve.
Returns:
objects populated with the details retrieved.
Throws:
S3ServiceException

getObjectACLs

public S3Object[] getObjectACLs(S3Bucket bucket,
                                S3Object[] objects)
                         throws S3ServiceException
Deprecated. 
Retrieves Access Control List (ACL) settings for multiple objects.

Parameters:
bucket - the bucket containing the objects.
objects - the objects whose ACLs will be retrieved.
Returns:
objects including the ACL information retrieved.
Throws:
S3ServiceException

putACLs

public S3Object[] putACLs(S3Bucket bucket,
                          S3Object[] objects)
                   throws S3ServiceException
Deprecated. 
Updates/sets Access Control List (ACL) settings for multiple objects.

Parameters:
bucket - the bucket containing the objects.
objects - objects containing ACL settings that will be updated/set.
Returns:
objects whose ACL settings were updated/set.
Throws:
S3ServiceException

downloadObjects

public void downloadObjects(S3Bucket bucket,
                            DownloadPackage[] downloadPackages)
                     throws S3ServiceException
Deprecated. 
A convenience method to download multiple objects from S3 to pre-existing output streams, which is particularly useful for downloading objects to files.

Parameters:
bucket - the bucket containing the objects
downloadPackages - an array of download package objects that manage the output of data for an S3Object.
Throws:
S3ServiceException