org.jclouds.aws.s3.blobstore.strategy.internal
Class SequentialMultipartUploadStrategy

java.lang.Object
  extended by org.jclouds.aws.s3.blobstore.strategy.internal.SequentialMultipartUploadStrategy
All Implemented Interfaces:
MultipartUpload, MultipartUploadStrategy

public class SequentialMultipartUploadStrategy
extends Object
implements MultipartUploadStrategy

Provides a sequential multipart upload strategy. The file partitioning algorithm: The default partition size we choose is 32mb. A multiple of this default partition size is used. The number of parts first grows to a chosen magnitude (for example 100 parts), then it grows the partition size instead of number of partitions. When we reached the maximum part size, then again it starts to grow the number of partitions.

Author:
Tibor Kiss

Field Summary
protected  AWSS3BlobStore ablobstore
           
protected  Logger logger
           
protected  PayloadSlicer slicer
           
 
Fields inherited from interface org.jclouds.aws.s3.blobstore.strategy.MultipartUpload
MAX_LIST_MPU_RETURNED, MAX_LIST_PARTS_RETURNED, MAX_NUMBER_OF_PARTS, MAX_PART_SIZE, MIN_PART_SIZE
 
Constructor Summary
SequentialMultipartUploadStrategy(AWSS3BlobStore ablobstore, PayloadSlicer slicer)
           
 
Method Summary
 String execute(String container, Blob blob)
           
protected  void prepareUploadPart(String container, String key, String uploadId, int part, Payload payload, long offset, long size, SortedMap<Integer,String> etags)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

@Named(value="jclouds.blobstore")
protected Logger logger

ablobstore

protected final AWSS3BlobStore ablobstore

slicer

protected final PayloadSlicer slicer
Constructor Detail

SequentialMultipartUploadStrategy

@Inject
public SequentialMultipartUploadStrategy(AWSS3BlobStore ablobstore,
                                                PayloadSlicer slicer)
Method Detail

prepareUploadPart

protected void prepareUploadPart(String container,
                                 String key,
                                 String uploadId,
                                 int part,
                                 Payload payload,
                                 long offset,
                                 long size,
                                 SortedMap<Integer,String> etags)

execute

public String execute(String container,
                      Blob blob)
Specified by:
execute in interface MultipartUploadStrategy


Copyright © 2009-2011 jclouds. All Rights Reserved.