Skip to content

[draft] S3 multiupart API #4232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

L-Applin
Copy link
Contributor

Duplicate of #4224 to try to fix merge form master issues

Adds MultipartConfiguration to the S3AsyncClientBuilder to enables Multipart operation on S3AsyncClient.

The following methods were added to S3AsyncClientBuilder (codegen):

    /**
     * Enables automatic conversion of put and copy method to their equivalent multipart operation.
     */
    default S3AsyncClientBuilder multipartEnabled(Boolean enabled) {
        throw new UnsupportedOperationException();
    }

    /**
     * Configuration for multipart operation of this client.
     */
    default S3AsyncClientBuilder multipartConfiguration(MultipartConfiguration multipartConfiguration) {
        throw new UnsupportedOperationException();
    }

    /**
     * Configuration for multipart operation of this client.
     */
    default S3AsyncClientBuilder multipartConfiguration(Consumer<Builder> multipartConfiguration) {
        Builder builder = MultipartConfiguration.builder();
        multipartConfiguration.accept(builder);
        return multipartConfiguration(builder.build());
    }

The following method has been added to DefaultS3AsyncClientBuilder (codegen):

    @Override
    public S3AsyncClientBuilder multipartEnabled(Boolean enabled) {
        clientContextParams.put(MultipartConfiguration.MULTIPART_ENABLED_KEY, enabled);
        return this;
    }

    @Override
    public S3AsyncClientBuilder multipartConfiguration(MultipartConfiguration multipartConfig) {
        clientContextParams.put(MultipartConfiguration.MULTIPART_CONFIGURATION_KEY, multipartConfig);
        return this;
    }

@L-Applin L-Applin requested a review from a team as a code owner July 27, 2023 16:50
@L-Applin L-Applin changed the title S3 multiupart API [draft] S3 multiupart API Jul 27, 2023
@L-Applin L-Applin marked this pull request as draft July 27, 2023 16:51
@L-Applin L-Applin closed this Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant