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

loadbalancer: deprecate RoundRobinLoadBalancer types #3149

Merged
merged 4 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -95,6 +95,7 @@
* @param <ResolvedAddress> The resolved address type.
* @param <C> The type of connection.
*/
// FIXME: 0.43 - remove deprecated class
final class RoundRobinLoadBalancer<ResolvedAddress, C extends LoadBalancedConnection>
implements TestableLoadBalancer<ResolvedAddress, C> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@
* @param <ResolvedAddress> The resolved address type.
* @param <C> The type of connection.
* @see RoundRobinLoadBalancers
* @deprecated use {@link LoadBalancerBuilder} interfaces instead.
*/
// FIXME: 0.43 - remove deprecated interface
@Deprecated
public interface RoundRobinLoadBalancerBuilder<ResolvedAddress, C extends LoadBalancedConnection> {
bryce-anderson marked this conversation as resolved.
Show resolved Hide resolved

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@

/**
* Provider for {@link RoundRobinLoadBalancerBuilder} that can be registered using {@link java.util.ServiceLoader}.
* @deprecated use the {@link LoadBalancerBuilder} implementations along with {@link LoadBalancerBuilderProvider}
*/
public interface RoundRobinLoadBalancerBuilderProvider {
@Deprecated
public interface RoundRobinLoadBalancerBuilderProvider { // FIXME: 0.43 - remove deprecated interface

/**
* Returns a {@link RoundRobinLoadBalancerBuilder} based on the pre-initialized
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
* @deprecated this class will be made package-private in the future, use {@link RoundRobinLoadBalancers} to create
bryce-anderson marked this conversation as resolved.
Show resolved Hide resolved
* {@link RoundRobinLoadBalancerBuilder}.
*/
@Deprecated // FIXME: 0.43 - make package private
@Deprecated // FIXME: 0.43 - remove in favor of DefaultLoadBalancer types.
public final class RoundRobinLoadBalancerFactory<ResolvedAddress, C extends LoadBalancedConnection>
implements LoadBalancerFactory<ResolvedAddress, C> {

Expand Down Expand Up @@ -110,7 +110,7 @@ public String toString() {
* @deprecated this class will be made package-private in the future, rely on the
* {@link RoundRobinLoadBalancerBuilder} instead.
bryce-anderson marked this conversation as resolved.
Show resolved Hide resolved
*/
@Deprecated // FIXME: 0.43 - make package private
@Deprecated // FIXME: 0.43 - Remove in favor of the DefaultLoadBalancer types.
public static final class Builder<ResolvedAddress, C extends LoadBalancedConnection>
bryce-anderson marked this conversation as resolved.
Show resolved Hide resolved
implements RoundRobinLoadBalancerBuilder<ResolvedAddress, C> {
private final String id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@

/**
* A factory to create {@link RoundRobinLoadBalancer RoundRobinLoadBalancers}.
* @deprecated use {@link LoadBalancers} instead.
*/
public final class RoundRobinLoadBalancers {
@Deprecated
public final class RoundRobinLoadBalancers { // FIXME: 0.43 - remove deprecated class
private static final Logger LOGGER = LoggerFactory.getLogger(RoundRobinLoadBalancers.class);

private static final List<RoundRobinLoadBalancerBuilderProvider> PROVIDERS;
Expand Down Expand Up @@ -59,8 +61,10 @@ RoundRobinLoadBalancerBuilder<ResolvedAddress, C> applyProviders(
* @param <ResolvedAddress> The resolved address type.
* @param <C> The type of connection.
* @return a new {@link RoundRobinLoadBalancerBuilder}.
* @deprecated use {#{@link LoadBalancers}} constructors instead.
*/
@SuppressWarnings("deprecation")
@Deprecated
public static <ResolvedAddress, C extends LoadBalancedConnection> RoundRobinLoadBalancerBuilder<ResolvedAddress, C>
builder(final String id) {
return applyProviders(id, new RoundRobinLoadBalancerFactory.Builder<>(id));
Expand Down
Loading