public static final class DefaultS3CrtAsyncClient.DefaultS3CrtClientBuilder extends Object implements S3CrtAsyncClientBuilder
| Constructor and Description |
|---|
DefaultS3CrtClientBuilder() |
| Modifier and Type | Method and Description |
|---|---|
S3CrtAsyncClient |
build() |
S3CrtAsyncClientBuilder |
checksumValidationEnabled(Boolean checksumValidationEnabled)
Option to disable checksum validation for
S3AsyncClient.getObject(GetObjectRequest, Path) and
S3AsyncClient.putObject(PutObjectRequest, Path). |
AwsCredentialsProvider |
credentialsProvider() |
S3CrtAsyncClientBuilder |
credentialsProvider(AwsCredentialsProvider credentialsProvider)
Configure the credentials that should be used to authenticate with S3.
|
URI |
endpointOverride() |
S3CrtAsyncClientBuilder |
endpointOverride(URI endpointOverride)
Configure the endpoint override with which the SDK should communicate.
|
S3CrtAsyncClientBuilder |
httpConfiguration(S3CrtHttpConfiguration configuration)
Sets the HTTP configuration to use for this client.
|
S3CrtAsyncClientBuilder |
initialReadBufferSizeInBytes(Long readBufferSizeInBytes)
Configure the starting buffer size the client will use to buffer the parts downloaded from S3.
|
Integer |
maxConcurrency() |
S3CrtAsyncClientBuilder |
maxConcurrency(Integer maxConcurrency)
Specifies the maximum number of S3 connections that should be established during
a transfer.
|
Long |
minimumPartSizeInBytes() |
S3CrtAsyncClientBuilder |
minimumPartSizeInBytes(Long partSizeBytes)
Sets the minimum part size for transfer parts.
|
Long |
readBufferSizeInBytes() |
Region |
region() |
S3CrtAsyncClientBuilder |
region(Region region)
Configure the region with which the SDK should communicate.
|
Double |
targetThroughputInGbps() |
S3CrtAsyncClientBuilder |
targetThroughputInGbps(Double targetThroughputInGbps)
The target throughput for transfer requests.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithttpConfigurationapplyMutationpublic AwsCredentialsProvider credentialsProvider()
public Region region()
public Long minimumPartSizeInBytes()
public Double targetThroughputInGbps()
public Integer maxConcurrency()
public URI endpointOverride()
public Long readBufferSizeInBytes()
public S3CrtAsyncClientBuilder credentialsProvider(AwsCredentialsProvider credentialsProvider)
S3CrtAsyncClientBuilderThe default provider will attempt to identify the credentials automatically using the following checks:
aws.accessKeyId and aws.secretKeyAWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEYIf the credentials are not found in any of the locations above, an exception will be thrown at S3CrtAsyncClientBuilder.build()
time.
credentialsProvider in interface S3CrtAsyncClientBuildercredentialsProvider - the credentials to usepublic S3CrtAsyncClientBuilder region(Region region)
S3CrtAsyncClientBuilderIf this is not specified, the SDK will attempt to identify the endpoint automatically using the following logic:
region in interface S3CrtAsyncClientBuilderregion - the region to be usedpublic S3CrtAsyncClientBuilder minimumPartSizeInBytes(Long partSizeBytes)
S3CrtAsyncClientBuilderBy default, it is 8MB. See Amazon S3 multipart upload limits for guidance.
minimumPartSizeInBytes in interface S3CrtAsyncClientBuilderpartSizeBytes - The minimum part size for transfer parts.public S3CrtAsyncClientBuilder targetThroughputInGbps(Double targetThroughputInGbps)
S3CrtAsyncClientBuilder
Whether the transfer manager can achieve the configured target throughput depends on various factors such as the network
bandwidth of the environment and whether S3CrtAsyncClientBuilder.maxConcurrency(java.lang.Integer) is configured.
By default, it is 10 gigabits per second. If users want to transfer as fast as possible, it's recommended to set it to the
maximum network bandwidth on the host that the application is running on. For EC2 instances, you can find network
bandwidth for a specific
instance type in Amazon EC2 instance type page.
If you are running into out of file descriptors error, consider using S3CrtAsyncClientBuilder.maxConcurrency(Integer) to limit the
number of connections.
targetThroughputInGbps in interface S3CrtAsyncClientBuildertargetThroughputInGbps - the target throughput in GbpsS3CrtAsyncClientBuilder.maxConcurrency(Integer)public S3CrtAsyncClientBuilder maxConcurrency(Integer maxConcurrency)
S3CrtAsyncClientBuilder
If not provided, the TransferManager will calculate the optional number of connections
based on S3CrtAsyncClientBuilder.targetThroughputInGbps(java.lang.Double). If the value is too low, the S3TransferManager
might not achieve the specified target throughput.
maxConcurrency in interface S3CrtAsyncClientBuildermaxConcurrency - the max number of concurrent requestsS3CrtAsyncClientBuilder.targetThroughputInGbps(Double)public S3CrtAsyncClientBuilder endpointOverride(URI endpointOverride)
S3CrtAsyncClientBuilderendpointOverride in interface S3CrtAsyncClientBuilderendpointOverride - the endpoint override to be usedpublic S3CrtAsyncClientBuilder checksumValidationEnabled(Boolean checksumValidationEnabled)
S3CrtAsyncClientBuilderS3AsyncClient.getObject(GetObjectRequest, Path) and
S3AsyncClient.putObject(PutObjectRequest, Path).
Checksum validation using CRC32 is enabled by default.
checksumValidationEnabled in interface S3CrtAsyncClientBuilderpublic S3CrtAsyncClientBuilder initialReadBufferSizeInBytes(Long readBufferSizeInBytes)
S3CrtAsyncClientBuilderBy default, it is equal to the resolved part size * 10
initialReadBufferSizeInBytes in interface S3CrtAsyncClientBuilderreadBufferSizeInBytes - the initial read buffer sizepublic S3CrtAsyncClientBuilder httpConfiguration(S3CrtHttpConfiguration configuration)
S3CrtAsyncClientBuilderhttpConfiguration in interface S3CrtAsyncClientBuilderconfiguration - The http proxy configuration to usepublic S3CrtAsyncClient build()
build in interface S3CrtAsyncClientBuilderbuild in interface Buildablebuild in interface SdkBuilder<S3CrtAsyncClientBuilder,S3AsyncClient>Copyright © 2023. All rights reserved.