Interface S3TransferManager.Builder
-
- All Known Implementing Classes:
TransferManagerFactory.DefaultBuilder
- Enclosing interface:
- S3TransferManager
public static interface S3TransferManager.Builder
The builder definition for aS3TransferManager
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description S3TransferManager
build()
Builds an instance ofS3TransferManager
based on the settings supplied to this builderS3TransferManager.Builder
executor(Executor executor)
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.S3TransferManager.Builder
s3Client(S3AsyncClient s3AsyncClient)
Specifies the low levelS3AsyncClient
that will be used to send requests to S3.S3TransferManager.Builder
uploadDirectoryFollowSymbolicLinks(Boolean uploadDirectoryFollowSymbolicLinks)
Specifies whether to follow symbolic links when traversing the file tree inS3TransferManager.uploadDirectory(software.amazon.awssdk.transfer.s3.model.UploadDirectoryRequest)
operationS3TransferManager.Builder
uploadDirectoryMaxDepth(Integer uploadDirectoryMaxDepth)
Specifies the maximum number of levels of directories to visit inS3TransferManager.uploadDirectory(software.amazon.awssdk.transfer.s3.model.UploadDirectoryRequest)
operation.
-
-
-
Method Detail
-
s3Client
S3TransferManager.Builder s3Client(S3AsyncClient s3AsyncClient)
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.- Parameters:
s3AsyncClient
- the S3 async client- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
S3AsyncClient.crtBuilder()
-
executor
S3TransferManager.Builder executor(Executor executor)
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.
- Parameters:
executor
- the executor to use- Returns:
- this builder for method chaining.
-
uploadDirectoryFollowSymbolicLinks
S3TransferManager.Builder uploadDirectoryFollowSymbolicLinks(Boolean uploadDirectoryFollowSymbolicLinks)
Specifies whether to follow symbolic links when traversing the file tree inS3TransferManager.uploadDirectory(software.amazon.awssdk.transfer.s3.model.UploadDirectoryRequest)
operationDefault to false
- Parameters:
uploadDirectoryFollowSymbolicLinks
- whether to follow symbolic links- Returns:
- This builder for method chaining.
-
uploadDirectoryMaxDepth
S3TransferManager.Builder uploadDirectoryMaxDepth(Integer uploadDirectoryMaxDepth)
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
- Parameters:
uploadDirectoryMaxDepth
- the maximum number of directory levels to visit- Returns:
- This builder for method chaining.
-
build
S3TransferManager build()
Builds an instance ofS3TransferManager
based on the settings supplied to this builder- Returns:
- an instance of
S3TransferManager
-
-