org.jets3t.service.multi.s3
Class ThreadedS3Service

java.lang.Object
  extended by org.jets3t.service.multi.ThreadedStorageService
      extended by org.jets3t.service.multi.s3.ThreadedS3Service

public class ThreadedS3Service
extends ThreadedStorageService


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jets3t.service.multi.ThreadedStorageService
ThreadedStorageService.AbstractRunnable, ThreadedStorageService.ThreadGroupManager
 
Field Summary
 
Fields inherited from class org.jets3t.service.multi.ThreadedStorageService
isShutdown, serviceEventListeners, sleepTime, storageService
 
Constructor Summary
ThreadedS3Service(S3Service service, StorageServiceEventListener listener)
           
 
Method Summary
protected  void fireServiceEvent(ServiceEvent event)
          Sends a service event to each of the listeners registered with this service.
 boolean multipartCompleteUploads(java.util.List<MultipartUpload> multipartUploads)
          Completes multiple multipart uploads and sends MultipartCompletesEvent notification events.
 boolean multipartStartUploads(java.lang.String bucketName, java.util.List<StorageObject> objects)
          Starts multiple multipart uploads and sends MultipartStartsEvent notification events.
 boolean multipartUploadParts(java.util.List<MultipartUploadAndParts> uploadAndPartsList)
          Uploads multiple objects that will constitute a single final object, and sends MultipartUploadsEvent notification events.
 
Methods inherited from class org.jets3t.service.multi.ThreadedStorageService
addServiceEventListener, copyObjects, createBuckets, deleteObjects, deleteObjects, downloadObjects, getObjectACLs, getObjects, getObjects, getObjectsHeads, getObjectsHeads, getProviderCredentials, getStorageService, isAuthenticatedConnection, isShutdown, listObjects, putACLs, putObjects, removeServiceEventListener, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadedS3Service

public ThreadedS3Service(S3Service service,
                         StorageServiceEventListener listener)
                  throws ServiceException
Throws:
ServiceException
Method Detail

fireServiceEvent

protected void fireServiceEvent(ServiceEvent event)
Description copied from class: ThreadedStorageService
Sends a service event to each of the listeners registered with this service.

Overrides:
fireServiceEvent in class ThreadedStorageService
Parameters:
event - the event to send to this service's registered event listeners.

multipartStartUploads

public boolean multipartStartUploads(java.lang.String bucketName,
                                     java.util.List<StorageObject> objects)
Starts multiple multipart uploads and sends MultipartStartsEvent notification events.

The maximum number of threads is controlled by the JetS3t configuration property threaded-service.max-admin-thread-count.

Parameters:
bucketName - the target bucket.
objects - a list of objects representing the overall multipart object.
Returns:
true if all the threaded tasks completed successfully, false otherwise.

multipartCompleteUploads

public boolean multipartCompleteUploads(java.util.List<MultipartUpload> multipartUploads)
Completes multiple multipart uploads and sends MultipartCompletesEvent notification events.

The maximum number of threads is controlled by the JetS3t configuration property threaded-service.max-admin-thread-count.

Parameters:
multipartUploads - a list of objects representing the multipart-uploads that will be completed.
Returns:
true if all the threaded tasks completed successfully, false otherwise.

multipartUploadParts

public boolean multipartUploadParts(java.util.List<MultipartUploadAndParts> uploadAndPartsList)
Uploads multiple objects that will constitute a single final object, and sends MultipartUploadsEvent notification events.

The maximum number of threads is controlled by the JetS3t configuration property threaded-service.max-admin-thread-count.

Parameters:
uploadAndPartsList - list of wrapper objects containing a previously-started MultipartUpload and a list of objects representing the parts that will make up the final object.
Returns:
true if all the threaded tasks completed successfully, false otherwise.