Resolver package is unstable

Motivation:
The resolver package had some changes late in the 4.1.CR phase and the intention was to mark this package as unstable until these interfaces solidify, but we forgot to mark the package and public classes with the unstable annotation.

Modifications:
- resolver package public interfaces and package-info should be annotated with @UnstableApi

Result:
The unstable nature of the resolver package is more clearly communicated.
This commit is contained in:
Scott Mitchell 2017-02-09 09:27:24 -08:00
parent 54c9ecf682
commit b91dd0678d
12 changed files with 25 additions and 0 deletions

View File

@ -20,6 +20,7 @@ import io.netty.util.concurrent.EventExecutor;
import io.netty.util.concurrent.Future;
import io.netty.util.concurrent.Promise;
import io.netty.util.internal.TypeParameterMatcher;
import io.netty.util.internal.UnstableApi;
import java.net.SocketAddress;
import java.nio.channels.UnsupportedAddressTypeException;
@ -31,6 +32,7 @@ import static io.netty.util.internal.ObjectUtil.checkNotNull;
/**
* A skeletal {@link AddressResolver} implementation.
*/
@UnstableApi
public abstract class AbstractAddressResolver<T extends SocketAddress> implements AddressResolver<T> {
private final EventExecutor executor;

View File

@ -17,6 +17,7 @@ package io.netty.resolver;
import io.netty.util.concurrent.Future;
import io.netty.util.concurrent.Promise;
import io.netty.util.internal.UnstableApi;
import java.io.Closeable;
import java.net.SocketAddress;
@ -26,6 +27,7 @@ import java.util.List;
/**
* Resolves a possibility unresolved {@link SocketAddress}.
*/
@UnstableApi
public interface AddressResolver<T extends SocketAddress> extends Closeable {
/**

View File

@ -19,6 +19,7 @@ package io.netty.resolver;
import io.netty.util.concurrent.EventExecutor;
import io.netty.util.concurrent.Future;
import io.netty.util.concurrent.FutureListener;
import io.netty.util.internal.UnstableApi;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
@ -31,6 +32,7 @@ import java.util.concurrent.ConcurrentMap;
/**
* Creates and manages {@link NameResolver}s so that each {@link EventExecutor} has its own resolver instance.
*/
@UnstableApi
public abstract class AddressResolverGroup<T extends SocketAddress> implements Closeable {
private static final InternalLogger logger = InternalLoggerFactory.getInstance(AddressResolverGroup.class);

View File

@ -19,6 +19,7 @@ import io.netty.util.concurrent.EventExecutor;
import io.netty.util.concurrent.Future;
import io.netty.util.concurrent.FutureListener;
import io.netty.util.concurrent.Promise;
import io.netty.util.internal.UnstableApi;
import java.util.Arrays;
import java.util.List;
@ -30,6 +31,7 @@ import static io.netty.util.internal.ObjectUtil.*;
*
* In case of a failure, only the last one will be reported.
*/
@UnstableApi
public final class CompositeNameResolver<T> extends SimpleNameResolver<T> {
private final NameResolver<T>[] resolvers;

View File

@ -17,12 +17,14 @@
package io.netty.resolver;
import io.netty.util.concurrent.EventExecutor;
import io.netty.util.internal.UnstableApi;
import java.net.InetSocketAddress;
/**
* A {@link AddressResolverGroup} of {@link DefaultNameResolver}s.
*/
@UnstableApi
public final class DefaultAddressResolverGroup extends AddressResolverGroup<InetSocketAddress> {
public static final DefaultAddressResolverGroup INSTANCE = new DefaultAddressResolverGroup();

View File

@ -19,6 +19,7 @@ package io.netty.resolver;
import io.netty.util.internal.SocketUtils;
import io.netty.util.concurrent.EventExecutor;
import io.netty.util.concurrent.Promise;
import io.netty.util.internal.UnstableApi;
import java.net.InetAddress;
import java.net.UnknownHostException;
@ -29,6 +30,7 @@ import java.util.List;
* A {@link InetNameResolver} that resolves using JDK's built-in domain name lookup mechanism.
* Note that this resolver performs a blocking name lookup from the caller thread.
*/
@UnstableApi
public class DefaultNameResolver extends InetNameResolver {
public DefaultNameResolver(EventExecutor executor) {

View File

@ -19,6 +19,7 @@ import io.netty.util.concurrent.EventExecutor;
import io.netty.util.concurrent.Future;
import io.netty.util.concurrent.FutureListener;
import io.netty.util.concurrent.Promise;
import io.netty.util.internal.UnstableApi;
import java.net.InetAddress;
import java.net.InetSocketAddress;
@ -28,6 +29,7 @@ import java.util.List;
/**
* A {@link AbstractAddressResolver} that resolves {@link InetSocketAddress}.
*/
@UnstableApi
public class InetSocketAddressResolver extends AbstractAddressResolver<InetSocketAddress> {
final NameResolver<InetAddress> nameResolver;

View File

@ -18,6 +18,7 @@ package io.netty.resolver;
import io.netty.util.concurrent.Future;
import io.netty.util.concurrent.Promise;
import io.netty.util.internal.UnstableApi;
import java.io.Closeable;
import java.util.List;
@ -25,6 +26,7 @@ import java.util.List;
/**
* Resolves an arbitrary string that represents the name of an endpoint into an address.
*/
@UnstableApi
public interface NameResolver<T> extends Closeable {
/**

View File

@ -18,6 +18,7 @@ package io.netty.resolver;
import io.netty.util.concurrent.EventExecutor;
import io.netty.util.concurrent.Promise;
import io.netty.util.internal.UnstableApi;
import java.net.SocketAddress;
import java.util.Collections;
@ -27,6 +28,7 @@ import java.util.List;
* A {@link AddressResolver} that does not perform any resolution but always reports successful resolution.
* This resolver is useful when name resolution is performed by a handler in a pipeline, such as a proxy handler.
*/
@UnstableApi
public class NoopAddressResolver extends AbstractAddressResolver<SocketAddress> {
public NoopAddressResolver(EventExecutor executor) {

View File

@ -17,12 +17,14 @@
package io.netty.resolver;
import io.netty.util.concurrent.EventExecutor;
import io.netty.util.internal.UnstableApi;
import java.net.SocketAddress;
/**
* A {@link AddressResolverGroup} of {@link NoopAddressResolver}s.
*/
@UnstableApi
public final class NoopAddressResolverGroup extends AddressResolverGroup<SocketAddress> {
public static final NoopAddressResolverGroup INSTANCE = new NoopAddressResolverGroup();

View File

@ -19,6 +19,7 @@ package io.netty.resolver;
import io.netty.util.concurrent.EventExecutor;
import io.netty.util.concurrent.Future;
import io.netty.util.concurrent.Promise;
import io.netty.util.internal.UnstableApi;
import java.util.List;
@ -27,6 +28,7 @@ import static io.netty.util.internal.ObjectUtil.*;
/**
* A skeletal {@link NameResolver} implementation.
*/
@UnstableApi
public abstract class SimpleNameResolver<T> implements NameResolver<T> {
private final EventExecutor executor;

View File

@ -17,4 +17,7 @@
/**
* Resolves an arbitrary string that represents the name of an endpoint into an address.
*/
@UnstableApi
package io.netty.resolver;
import io.netty.util.internal.UnstableApi;