Skip to content

Commit 76281d6

Browse files
committed
Update javadocs
1 parent 523b2bd commit 76281d6

File tree

2 files changed

+28
-10
lines changed

2 files changed

+28
-10
lines changed

services/s3/src/main/java/software/amazon/awssdk/services/s3/multipart/MultipartConfiguration.java

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import software.amazon.awssdk.annotations.SdkPublicApi;
1919
import software.amazon.awssdk.core.async.AsyncRequestBody;
2020
import software.amazon.awssdk.core.async.AsyncResponseTransformer;
21+
import software.amazon.awssdk.core.internal.async.ByteArrayAsyncResponseTransformer;
2122
import software.amazon.awssdk.services.s3.S3AsyncClient;
2223
import software.amazon.awssdk.services.s3.S3AsyncClientBuilder;
2324
import software.amazon.awssdk.services.s3.model.CopyObjectRequest;
@@ -28,15 +29,21 @@
2829
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
2930

3031
/**
31-
* Class that hold configuration properties related to multipart operation for a {@link S3AsyncClient}. Passing this class to the
32-
* {@link S3AsyncClientBuilder#multipartConfiguration(MultipartConfiguration)} will enable automatic conversion of
33-
* {@link S3AsyncClient#getObject(GetObjectRequest, AsyncResponseTransformer)},
34-
* {@link S3AsyncClient#putObject(PutObjectRequest, AsyncRequestBody)} and
35-
* {@link S3AsyncClient#copyObject(CopyObjectRequest)} to their respective multipart operation.
32+
* Class that holds configuration properties related to multipart operations for a {@link S3AsyncClient}. Passing this class to
33+
* the {@link S3AsyncClientBuilder#multipartConfiguration(MultipartConfiguration)} will enable automatic conversion of the
34+
* following operations to their respective multipart variants:
35+
* <ul>
36+
* <li>{@link S3AsyncClient#getObject(GetObjectRequest, AsyncResponseTransformer)},
37+
* <li>{@link S3AsyncClient#putObject(PutObjectRequest, AsyncRequestBody)}
38+
* <li>{@link S3AsyncClient#copyObject(CopyObjectRequest)}
39+
* </ul>
3640
* <p>
37-
* Note that multipart download fetch individual part of the object using {@link GetObjectRequest#partNumber() part number}, this
38-
* means it will only download multiple parts if the
39-
* object itself was uploaded as a {@link S3AsyncClient#createMultipartUpload(CreateMultipartUploadRequest) multipart object}
41+
* Note that multipart download fetches individual parts of the object using {@link GetObjectRequest#partNumber() PartNumber}.
42+
* This means the S3 client will only download multiple parts if the object itself was uploaded as a
43+
* {@link S3AsyncClient#createMultipartUpload(CreateMultipartUploadRequest) multipart object}
44+
* <p>
45+
* When performing multipart download, retry is only supported for downloading to byte array, i.e., when providing a
46+
* {@link ByteArrayAsyncResponseTransformer}
4047
*/
4148
@SdkPublicApi
4249
public final class MultipartConfiguration implements ToCopyableBuilder<MultipartConfiguration.Builder, MultipartConfiguration> {
@@ -83,6 +90,10 @@ public Long minimumPartSizeInBytes() {
8390

8491
/**
8592
* The maximum memory, in bytes, that the SDK will use to buffer requests content into memory.
93+
* <p>
94+
* This setting is not supported and will be ignored when downloading to a byte array, i.e., when providing a
95+
* {@link ByteArrayAsyncResponseTransformer}.
96+
*
8697
* @return the value of the configured maximum memory usage.
8798
*/
8899
public Long apiCallBufferSizeInBytes() {
@@ -152,6 +163,9 @@ public interface Builder extends CopyableBuilder<Builder, MultipartConfiguration
152163
* Increasing this value may lead to better performance at the cost of using more memory.
153164
* <p>
154165
* Default value: If not specified, the SDK will use the equivalent of four parts worth of memory, so 32 Mib by default.
166+
* <p>
167+
* This setting is not supported and will be ignored when downloading to a byte array, i.e., when providing a
168+
* {@link ByteArrayAsyncResponseTransformer}.
155169
*
156170
* @param apiCallBufferSizeInBytes the value of the maximum memory usage.
157171
* @return an instance of this builder.
@@ -170,20 +184,24 @@ private static class DefaultMultipartConfigBuilder implements Builder {
170184
private Long minimumPartSizeInBytes;
171185
private Long apiCallBufferSizeInBytes;
172186

187+
@Override
173188
public Builder thresholdInBytes(Long thresholdInBytes) {
174189
this.thresholdInBytes = thresholdInBytes;
175190
return this;
176191
}
177192

193+
@Override
178194
public Long thresholdInBytes() {
179195
return this.thresholdInBytes;
180196
}
181197

198+
@Override
182199
public Builder minimumPartSizeInBytes(Long minimumPartSizeInBytes) {
183200
this.minimumPartSizeInBytes = minimumPartSizeInBytes;
184201
return this;
185202
}
186203

204+
@Override
187205
public Long minimumPartSizeInBytes() {
188206
return this.minimumPartSizeInBytes;
189207
}

services/s3/src/main/resources/codegen-resources/customization.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@
289289
"useS3ExpressSessionAuth": true,
290290
"multipartCustomization": {
291291
"multipartConfigurationClass": "software.amazon.awssdk.services.s3.multipart.MultipartConfiguration",
292-
"multipartConfigMethodDoc": "Configuration for multipart operation of this client.",
293-
"multipartEnableMethodDoc": "Enables automatic conversion of GET, PUT and COPY methods to their equivalent multipart operation. CRC32 checksum will be enabled for PUT, unless the checksum is specified or checksum validation is disabled.",
292+
"multipartConfigMethodDoc": "Configuration for multipart operation of this client.<p>When performing multipart download, retry is only supported for downloading to byte array, i.e., when providing a {@code ByteArrayAsyncResponseTransformer}",
293+
"multipartEnableMethodDoc": "Enables automatic conversion of GET, PUT and COPY methods to their equivalent multipart operation. CRC32 checksum will be enabled for PUT, unless the checksum is specified or checksum validation is disabled.<p>When performing multipart download, retry is only supported for downloading to byte array, i.e., when providing a {@code ByteArrayAsyncResponseTransformer}",
294294
"contextParamEnabledKey": "S3AsyncClientDecorator.MULTIPART_ENABLED_KEY",
295295
"contextParamConfigKey": "S3AsyncClientDecorator.MULTIPART_CONFIGURATION_KEY"
296296
},

0 commit comments

Comments
 (0)