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 ofS3TransferManager
based on the settings supplied to this builderSpecifies the executor thatS3TransferManager
will 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 levelS3AsyncClient
that will be used to send requests to S3.void
setUploadDirectoryFollowSymbolicLinks
(Boolean followSymbolicLinks) void
setUploadDirectoryMaxDepth
(Integer uploadDirectoryMaxDepth) 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.Builder
Specifies the low levelS3AsyncClient
that will be used to send requests to S3. The SDK will create a defaultS3AsyncClient
if not provided.It's highly recommended to use
S3AsyncClient.crtBuilder()
to create anS3AsyncClient
instance to benefit from multipart upload/download feature and maximum throughput.Note: the provided
S3AsyncClient
will 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:
s3Client
in 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.Builder
Specifies the executor thatS3TransferManager
will 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:
executor
in 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.Builder
Specifies whether to follow symbolic links when traversing the file tree inS3TransferManager.uploadDirectory(software.amazon.awssdk.transfer.s3.model.UploadDirectoryRequest)
operationDefault to false
- Specified by:
uploadDirectoryFollowSymbolicLinks
in 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.Builder
Specifies 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:
uploadDirectoryMaxDepth
in interfaceS3TransferManager.Builder
- Parameters:
uploadDirectoryMaxDepth
- the maximum number of directory levels to visit- Returns:
- This builder for method chaining.
-
setUploadDirectoryMaxDepth
-
getUploadDirectoryMaxDepth
-
build
Description copied from interface:S3TransferManager.Builder
Builds an instance ofS3TransferManager
based on the settings supplied to this builder- Specified by:
build
in interfaceS3TransferManager.Builder
- Returns:
- an instance of
S3TransferManager
-