Class TransferManagerFactory.DefaultBuilder
java.lang.Object
software.amazon.awssdk.transfer.s3.internal.TransferManagerFactory.DefaultBuilder
- All Implemented Interfaces:
S3TransferManager.Builder
- Enclosing class:
TransferManagerFactory
public static final class TransferManagerFactory.DefaultBuilder
extends Object
implements S3TransferManager.Builder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an instance ofS3TransferManagerbased on the settings supplied to this builderSpecifies the executor thatS3TransferManagerwill use to execute background tasks before handing them off to the underlying S3 async client, such as visiting file tree in aS3TransferManager.uploadDirectory(UploadDirectoryRequest)operation.s3Client(S3AsyncClient s3AsyncClient) Specifies the low levelS3AsyncClientthat will be used to send requests to S3.voidsetTransferDirectoryMaxConcurrency(Integer transferDirectoryMaxConcurrency) voidsetUploadDirectoryFollowSymbolicLinks(Boolean followSymbolicLinks) voidsetUploadDirectoryMaxDepth(Integer uploadDirectoryMaxDepth) transferDirectoryMaxConcurrency(Integer transferDirectoryMaxConcurrency) Specifies the maximum number of concurrent file transfers that will be performed when uploading or downloading a directory.uploadDirectoryFollowSymbolicLinks(Boolean uploadDirectoryFollowSymbolicLinks) Specifies whether to follow symbolic links when traversing the file tree inS3TransferManager.uploadDirectory(software.amazon.awssdk.transfer.s3.model.UploadDirectoryRequest)operationuploadDirectoryMaxDepth(Integer uploadDirectoryMaxDepth) Specifies the maximum number of levels of directories to visit inS3TransferManager.uploadDirectory(software.amazon.awssdk.transfer.s3.model.UploadDirectoryRequest)operation.
-
Constructor Details
-
DefaultBuilder
public DefaultBuilder()
-
-
Method Details
-
s3Client
Description copied from interface:S3TransferManager.BuilderSpecifies the low levelS3AsyncClientthat will be used to send requests to S3. The SDK will create a defaultS3AsyncClientif not provided.It's highly recommended to use
S3AsyncClient.crtBuilder()to create anS3AsyncClientinstance to benefit from multipart upload/download feature and maximum throughput.Note: the provided
S3AsyncClientwill not be closed when the transfer manager is closed; it must be closed by the caller when it is ready to be disposed.- Specified by:
s3Clientin interfaceS3TransferManager.Builder- Parameters:
s3AsyncClient- the S3 async client- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
executor
Description copied from interface:S3TransferManager.BuilderSpecifies the executor thatS3TransferManagerwill use to execute background tasks before handing them off to the underlying S3 async client, such as visiting file tree in aS3TransferManager.uploadDirectory(UploadDirectoryRequest)operation.The SDK will create an executor if not provided.
This executor must be shut down by the user when it is ready to be disposed. The SDK will not close the executor when the s3 transfer manager is closed.
- Specified by:
executorin interfaceS3TransferManager.Builder- Parameters:
executor- the executor to use- Returns:
- this builder for method chaining.
-
uploadDirectoryFollowSymbolicLinks
public TransferManagerFactory.DefaultBuilder uploadDirectoryFollowSymbolicLinks(Boolean uploadDirectoryFollowSymbolicLinks) Description copied from interface:S3TransferManager.BuilderSpecifies whether to follow symbolic links when traversing the file tree inS3TransferManager.uploadDirectory(software.amazon.awssdk.transfer.s3.model.UploadDirectoryRequest)operationDefault to false
- Specified by:
uploadDirectoryFollowSymbolicLinksin interfaceS3TransferManager.Builder- Parameters:
uploadDirectoryFollowSymbolicLinks- whether to follow symbolic links- Returns:
- This builder for method chaining.
-
setUploadDirectoryFollowSymbolicLinks
-
getUploadDirectoryFollowSymbolicLinks
-
uploadDirectoryMaxDepth
public TransferManagerFactory.DefaultBuilder uploadDirectoryMaxDepth(Integer uploadDirectoryMaxDepth) Description copied from interface:S3TransferManager.BuilderSpecifies the maximum number of levels of directories to visit inS3TransferManager.uploadDirectory(software.amazon.awssdk.transfer.s3.model.UploadDirectoryRequest)operation. Must be positive. 1 means only the files directly within the provided source directory are visited.Default to
Integer.MAX_VALUE- Specified by:
uploadDirectoryMaxDepthin interfaceS3TransferManager.Builder- Parameters:
uploadDirectoryMaxDepth- the maximum number of directory levels to visit- Returns:
- This builder for method chaining.
-
setUploadDirectoryMaxDepth
-
getUploadDirectoryMaxDepth
-
transferDirectoryMaxConcurrency
public TransferManagerFactory.DefaultBuilder transferDirectoryMaxConcurrency(Integer transferDirectoryMaxConcurrency) Description copied from interface:S3TransferManager.BuilderSpecifies the maximum number of concurrent file transfers that will be performed when uploading or downloading a directory. This setting controls the concurrency for an individual call toS3TransferManager.uploadDirectory(software.amazon.awssdk.transfer.s3.model.UploadDirectoryRequest)orS3TransferManager.downloadDirectory(software.amazon.awssdk.transfer.s3.model.DownloadDirectoryRequest).Default to 100
- Specified by:
transferDirectoryMaxConcurrencyin interfaceS3TransferManager.Builder- Parameters:
transferDirectoryMaxConcurrency- the maximum number of concurrent file transfers- Returns:
- This builder for method chaining.
-
setTransferDirectoryMaxConcurrency
-
getTransferDirectoryMaxConcurrency
-
build
Description copied from interface:S3TransferManager.BuilderBuilds an instance ofS3TransferManagerbased on the settings supplied to this builder- Specified by:
buildin interfaceS3TransferManager.Builder- Returns:
- an instance of
S3TransferManager
-