Skip to content
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

Mark plugin API as preview #4558

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.TreeMap;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Immutable;
import software.amazon.awssdk.annotations.SdkPreviewApi;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration;
import software.amazon.awssdk.core.interceptor.ExecutionAttribute;
Expand Down Expand Up @@ -153,6 +154,7 @@ public List<MetricPublisher> metricPublishers() {
/**
* Return the plugins that will be used to update the configuration used by the request.
*/
@SdkPreviewApi
public List<SdkPlugin> plugins() {
return plugins;
}
Expand Down Expand Up @@ -494,11 +496,13 @@ default B putRawQueryParameter(String name, String value) {
*
* @param plugin The plugin to add.
*/
@SdkPreviewApi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like we missed adding it to B plugins(List<SdkPlugin> plugins); above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I opened #4580 to fix this and other issues. Thanks!

B addPlugin(SdkPlugin plugin);

/**
* Returns the list of registered plugins
*/
@SdkPreviewApi
List<SdkPlugin> plugins();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

package software.amazon.awssdk.core;

import software.amazon.awssdk.annotations.SdkPreviewApi;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.annotations.ThreadSafe;
import software.amazon.awssdk.utils.SdkAutoCloseable;
Expand All @@ -23,6 +24,7 @@
* A plugin modifies a client's configuration when the client is created or at request execution
* time.
*/
@SdkPreviewApi
@SdkPublicApi
sugmanue marked this conversation as resolved.
Show resolved Hide resolved
@ThreadSafe
@FunctionalInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.net.URI;
import java.util.List;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.SdkPreviewApi;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.core.SdkPlugin;
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration;
Expand Down Expand Up @@ -82,13 +83,15 @@ default B putAuthScheme(AuthScheme<?> authScheme) {
* Adds a plugin to the client builder. The plugins will be invoked when building the client to allow them to change the
* configuration of the built client.
*/
@SdkPreviewApi
default B addPlugin(SdkPlugin plugin) {
throw new UnsupportedOperationException();
}

/**
* Returns the list of plugins configured on the client builder.
*/
@SdkPreviewApi
default List<SdkPlugin> plugins() {
throw new UnsupportedOperationException();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;
import software.amazon.awssdk.annotations.SdkPreviewApi;
import software.amazon.awssdk.annotations.SdkProtectedApi;
import software.amazon.awssdk.annotations.SdkTestInternalApi;
import software.amazon.awssdk.core.CompressionConfiguration;
Expand Down Expand Up @@ -409,6 +410,7 @@ private SdkClientConfiguration finalizeConfiguration(SdkClientConfiguration conf
* By default, returns the configuration as-is. Classes extending this method will take care of running the plugins and
* return the updated configuration if plugins are supported.
*/
@SdkPreviewApi
protected SdkClientConfiguration invokePlugins(SdkClientConfiguration config) {
return config;
}
Expand Down
Loading