mirror of https://github.com/grpc/grpc-java.git
core: deprecate LoadBalancer.Helper#getNameResolverFactory (#5418)
This was added for the potential use case of needing to resolve target names (of the same scheme as the top-level channel's target's) in the LoadBalancer. Now actual use cases come up in xDS that we need to resolve fully-qualified target strings with arbitrary schemes. This method has never been used and won't fit future uses because it's too restrictive.
This commit is contained in:
parent
59a336c3ae
commit
a15a3117de
|
|
@ -659,7 +659,11 @@ public abstract class LoadBalancer {
|
|||
* Returns the NameResolver of the channel.
|
||||
*
|
||||
* @since 1.2.0
|
||||
*
|
||||
* @deprecated this method will be deleted in a future release. If you think it shouldn't be
|
||||
* deleted, please file an issue on <a href="https://github.com/grpc/grpc-java">github</a>.
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract NameResolver.Factory getNameResolverFactory();
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1256,6 +1256,7 @@ final class ManagedChannelImpl extends ManagedChannel implements
|
|||
return ManagedChannelImpl.this.authority();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public NameResolver.Factory getNameResolverFactory() {
|
||||
return nameResolverFactory;
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ public abstract class ForwardingLoadBalancerHelper extends LoadBalancer.Helper {
|
|||
delegate().runSerialized(task);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public NameResolver.Factory getNameResolverFactory() {
|
||||
return delegate().getNameResolverFactory();
|
||||
|
|
|
|||
|
|
@ -211,7 +211,9 @@ public class LoadBalancerTest {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override public NameResolver.Factory getNameResolverFactory() {
|
||||
@Deprecated
|
||||
@Override
|
||||
public NameResolver.Factory getNameResolverFactory() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1190,6 +1190,7 @@ public class HealthCheckingLoadBalancerFactoryTest {
|
|||
return clock.getScheduledExecutorService();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public NameResolver.Factory getNameResolverFactory() {
|
||||
throw new AssertionError("Should not be called");
|
||||
|
|
|
|||
Loading…
Reference in New Issue