mirror of https://github.com/grpc/grpc-java.git
api: Don't yet deprecate NameResolver.Listener
We think NameResolver.Listener2 may still change, so don't yet encourage people to migrate. Fixes #5764
This commit is contained in:
parent
15a453d9ef
commit
b6720c9fe6
|
|
@ -71,10 +71,8 @@ public abstract class NameResolver {
|
||||||
* Starts the resolution.
|
* Starts the resolution.
|
||||||
*
|
*
|
||||||
* @param listener used to receive updates on the target
|
* @param listener used to receive updates on the target
|
||||||
* @deprecated override {@link #start(Listener2)} instead.
|
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public void start(final Listener listener) {
|
public void start(final Listener listener) {
|
||||||
if (listener instanceof Listener2) {
|
if (listener instanceof Listener2) {
|
||||||
start((Listener2) listener);
|
start((Listener2) listener);
|
||||||
|
|
@ -94,7 +92,7 @@ public abstract class NameResolver {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts the resolution. This method will become abstract in 1.21.0.
|
* Starts the resolution.
|
||||||
*
|
*
|
||||||
* @param listener used to receive updates on the target
|
* @param listener used to receive updates on the target
|
||||||
* @since 1.21.0
|
* @since 1.21.0
|
||||||
|
|
@ -270,12 +268,10 @@ public abstract class NameResolver {
|
||||||
*
|
*
|
||||||
* <p>All methods are expected to return quickly.
|
* <p>All methods are expected to return quickly.
|
||||||
*
|
*
|
||||||
* @deprecated use {@link Listener2} instead.
|
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770")
|
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770")
|
||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
@Deprecated
|
|
||||||
public interface Listener {
|
public interface Listener {
|
||||||
/**
|
/**
|
||||||
* Handles updates on resolved addresses and attributes.
|
* Handles updates on resolved addresses and attributes.
|
||||||
|
|
@ -304,12 +300,15 @@ public abstract class NameResolver {
|
||||||
*
|
*
|
||||||
* <p>All methods are expected to return quickly.
|
* <p>All methods are expected to return quickly.
|
||||||
*
|
*
|
||||||
|
* <p>This is a replacement API of {@code Listener}. However, we think this new API may change
|
||||||
|
* again, so we aren't yet encouraging mass-migration to it. It is fine to use and works.
|
||||||
|
*
|
||||||
* @since 1.21.0
|
* @since 1.21.0
|
||||||
*/
|
*/
|
||||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770")
|
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770")
|
||||||
public abstract static class Listener2 implements Listener {
|
public abstract static class Listener2 implements Listener {
|
||||||
/**
|
/**
|
||||||
* @deprecated This will be removed in 1.21.0
|
* @deprecated This will be removed in 1.22.0
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue