Class S3ServiceSimpleMulti


  • @Deprecated
    public class S3ServiceSimpleMulti
    extends Object
    Deprecated.
    0.8.0 use SimpleThreadedStorageService instead.
    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.

    Author:
    James Murty
    • 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

      • 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 Map[] copyObjects​(String sourceBucketName,
                                 String destinationBucketName,
                                 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​(String[] versionIds,
                                                  String multiFactorSerialNumber,
                                                  String multiFactorAuthCode,
                                                  String bucketName,
                                                  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​(String[] versionIds,
                                           String bucketName,
                                           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,
                                     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,
                                          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