Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   *
   *  http://aws.amazon.com/apache2.0
   *
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.s3.transfer;
 
 import static com.amazonaws.services.s3.internal.Constants.*;

Configuration options for how TransferManager processes requests.

The best configuration settings depend on network configuration, latency and bandwidth. The default configuration settings are suitable for most applications, but this class enables developers to experiment with different configurations and tune transfer manager performance.

 
 public class TransferManagerConfiguration {

    
Default minimum part size for upload parts.
 
     private static final int DEFAULT_MINIMUM_UPLOAD_PART_SIZE = 5 * ;

    
Default size threshold for when to use multipart uploads.
 
     private static final long DEFAULT_MULTIPART_UPLOAD_THRESHOLD = 16 * ;

    
Default size threshold for Amazon S3 object after which multi-part copy is initiated.
 
     private static final long DEFAULT_MULTIPART_COPY_THRESHOLD = 5 * ;

    
Default minimum size of each part for multi-part copy.
 
     private static final long DEFAULT_MINIMUM_COPY_PART_SIZE = 100 * ;

    
The minimum part size for upload parts. Decreasing the minimum part size will cause multipart uploads to be split into a larger number of smaller parts. Setting this value too low can have a negative effect on transfer speeds since it will cause extra latency and network communication for each part.
 
     private long minimumUploadPartSize = ;

    
The size threshold, in bytes, for when to use multipart uploads. Uploads over this size will automatically use a multipart upload strategy, while uploads smaller than this threshold will use a single connection to upload the whole object.

Multipart uploads are easier to recover from and also potentially faster than single part uploads, especially when the upload parts can be uploaded in parallel as with files. Because there is additional network communication, small uploads are still recommended to use a single connection for the upload.

 
The size threshold, in bytes, for when to use multi-part copy. Copy requests for objects over this size will automatically use a multi-part copy strategy, while copy requests for objects smaller than this threshold will use a single connection to copy the whole object.
 
     private long multipartCopyThreshold = ;

    
The minimum size in bytes of each part when a multi-part copy operation is carried out. Decreasing the minimum part size will cause a large number of copy part requests being initiated.
 
     private long multipartCopyPartSize = ;

    
Returns the minimum part size for upload parts. Decreasing the minimum part size causes multipart uploads to be split into a larger number of smaller parts. Setting this value too low has a negative effect on transfer speeds, causing extra latency and network communication for each part.

Returns:
The minimum part size for upload parts.
 
     public long getMinimumUploadPartSize() {
         return ;
     }

    
Sets the minimum part size for upload parts. Decreasing the minimum part size causes multipart uploads to be split into a larger number of smaller parts. Setting this value too low has a negative effect on transfer speeds, causing extra latency and network communication for each part.

Parameters:
minimumUploadPartSize The minimum part size for upload parts.
    public void setMinimumUploadPartSize(long minimumUploadPartSize) {
        this. = minimumUploadPartSize;
    }

    
Returns the size threshold in bytes for when to use multipart uploads. Uploads over this size will automatically use a multipart upload strategy, while uploads smaller than this threshold will use a single connection to upload the whole object.

Multipart uploads are easier to recover from and potentially faster than single part uploads, especially when the upload parts can be uploaded in parallel as with files. Due to additional network communication, small uploads should use a single connection for the upload.

Returns:
The size threshold in bytes for when to use multipart uploads.
    public long getMultipartUploadThreshold() {
        return ;
    }

    
Sets the size threshold in bytes for when to use multipart uploads. Uploads over this size will automatically use a multipart upload strategy, while uploads smaller than this threshold will use a single connection to upload the whole object.

Multipart uploads are easier to recover from and potentially faster than single part uploads, especially when the upload parts can be uploaded in parallel as with files. Due to additional network communication, small uploads should use a single connection for the upload.

Parameters:
multipartUploadThreshold The size threshold in bytes for when to use multipart uploads.
    public void setMultipartUploadThreshold(long multipartUploadThreshold) {
        this. = multipartUploadThreshold;
    }

    
Returns the minimum size in bytes of each part in a multi-part copy request. Decreasing this size will result in increase in the number of copy part requests to the server.

Returns:
The minimum size in bytes for each part in a multi-part copy request.
    public long getMultipartCopyPartSize() {
        return ;
    }

    
Sets the minimum part size in bytes for each part in a multi-part copy request. Decreasing this size will result in increase in the number of copy part requests to the server.

Parameters:
multipartCopyPartSize The minimum size in bytes for each part in a multi part copy request.
    public void setMultipartCopyPartSize(long multipartCopyPartSize) {
        this. = multipartCopyPartSize;
    }

    
Returns the maximum threshold size of an Amazon S3 object after which the copy operation is carried out using multi-part request.

Returns:
The size threshold of an Amazon S3 object for when to use a multi-part copy
    public long getMultipartCopyThreshold() {
        return ;
    }

    
Sets the size threshold in bytes for when to use multi-part copy requests. Copy requests for objects over this size will automatically use a multi-part copy strategy, while copy requests for objects smaller than this threshold will use a single connection to copy the whole object.

Parameters:
multipartCopyThreshold The size threshold in bytes for when to use multi part copy.
    public void setMultipartCopyThreshold(long multipartCopyThreshold) {
        this. = multipartCopyThreshold;
    }
New to GrepCode? Check out our FAQ X