api: Deprecate LoadBalancer.handleResolvedAddresses()#11623
api: Deprecate LoadBalancer.handleResolvedAddresses()#11623SreeramdasLavanya wants to merge 87 commits intogrpc:masterfrom
Conversation
…h Duration" This reverts commit ab97045.
|
Below points have been addressed: javadoc for public void handleResolvedAddresses(ResolvedAddresses resolvedAddresses)
javadoc for public Status acceptResolvedAddresses(ResolvedAddresses resolvedAddresses)
|
| * single list if needed. | ||
| * | ||
| * <p>Implementations can choose to reject the given addresses by returning {@code false}. | ||
| * <p>Implementations can choose to reject the given addresses by returning {@code UNAVAILABLE}. |
There was a problem hiding this comment.
Replace with {@code Status.UNAVAILABLE} . Also below.
…d and related changes
util/src/main/java/io/grpc/util/GracefulSwitchLoadBalancer.java
Outdated
Show resolved
Hide resolved
xds/src/test/java/io/grpc/xds/WeightedTargetLoadBalancerTest.java
Outdated
Show resolved
Hide resolved
util/src/test/java/io/grpc/util/ForwardingLoadBalancerTest.java
Outdated
Show resolved
Hide resolved
|
I worked on all the open comments and added the commit
|
We want to keep the old behavior until the old usages are removed.
Any old implementations that still implement handleResolvedAddresses() will have their implementationed "skipped" by new callers of acceptResolvedAddresses(). We've been having such forwarders implement both methods instead. Since there's very few usages of handleResolvedAddresses() left, out-of-tree implementations should generally be fine just swapping to acceptResolvedAddresses.
It should have been completely deleted if the method was being deleted. In this case, since I've restored the method we just need Deprecated on the test.
ejona86
left a comment
There was a problem hiding this comment.
@shivaspeaks, you can see now how the change is basically just the deprecation annotation and the one ClusterImplLoadBalancer fix. My best guess for why ClusterImplLoadBalancer wasn't already migrated is because we might have been in the middle of L74 and didn't want to do any unnecessary changes that would conflict.
|
Looks like the version of checkstyle we use on Java 11+ fails to detect Javadoc |
Also deprecate its companion canHandleEmptyAddressListFromNameResolution().
Also fixup the Javadoc to align with the arguments/return values, so that people
would have a better idea of how to use it.
Fixes #11194