From 0f9e3fa2eaf3e28bf715eeb0729c8626f7083ec6 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 3 May 2016 13:03:05 -0700 Subject: [PATCH] all: Add issues for many of the experimental API annotations --- core/src/main/java/io/grpc/Attributes.java | 2 +- core/src/main/java/io/grpc/BindableService.java | 2 +- core/src/main/java/io/grpc/CallOptions.java | 17 ++++++++--------- core/src/main/java/io/grpc/ClientCall.java | 2 +- core/src/main/java/io/grpc/Codec.java | 2 +- core/src/main/java/io/grpc/Compressor.java | 2 +- .../main/java/io/grpc/CompressorRegistry.java | 2 +- core/src/main/java/io/grpc/Context.java | 2 +- core/src/main/java/io/grpc/Contexts.java | 3 ++- core/src/main/java/io/grpc/Deadline.java | 2 +- core/src/main/java/io/grpc/Decompressor.java | 2 +- .../main/java/io/grpc/DecompressorRegistry.java | 4 ++-- .../java/io/grpc/DnsNameResolverFactory.java | 2 +- .../java/io/grpc/EquivalentAddressGroup.java | 2 +- core/src/main/java/io/grpc/LoadBalancer.java | 3 ++- .../java/io/grpc/ManagedChannelBuilder.java | 14 +++++++------- .../java/io/grpc/ManagedChannelProvider.java | 1 - .../src/main/java/io/grpc/MethodDescriptor.java | 10 +++++----- core/src/main/java/io/grpc/NameResolver.java | 2 +- .../main/java/io/grpc/NameResolverRegistry.java | 2 +- .../io/grpc/PartialForwardingServerCall.java | 4 ++-- .../main/java/io/grpc/ResolvedServerInfo.java | 2 +- core/src/main/java/io/grpc/ServerBuilder.java | 4 ++-- core/src/main/java/io/grpc/ServerCall.java | 4 ++-- .../main/java/io/grpc/ServerCallHandler.java | 2 +- .../java/io/grpc/ServerMethodDefinition.java | 2 +- .../java/io/grpc/ServerServiceDefinition.java | 10 +++++----- .../java/io/grpc/SimpleLoadBalancerFactory.java | 2 +- .../AbstractManagedChannelImplBuilder.java | 3 --- .../java/io/grpc/internal/ContextRunnable.java | 2 -- .../main/java/io/grpc/stub/AbstractStub.java | 4 ++-- 31 files changed, 56 insertions(+), 61 deletions(-) diff --git a/core/src/main/java/io/grpc/Attributes.java b/core/src/main/java/io/grpc/Attributes.java index b8821ded0e..dab06000f0 100644 --- a/core/src/main/java/io/grpc/Attributes.java +++ b/core/src/main/java/io/grpc/Attributes.java @@ -43,7 +43,7 @@ import javax.annotation.concurrent.Immutable; /** * An immutable type-safe container of attributes. */ -@ExperimentalApi +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1764") @Immutable public final class Attributes { diff --git a/core/src/main/java/io/grpc/BindableService.java b/core/src/main/java/io/grpc/BindableService.java index 14e4543bd6..f8415f0ff4 100644 --- a/core/src/main/java/io/grpc/BindableService.java +++ b/core/src/main/java/io/grpc/BindableService.java @@ -46,7 +46,7 @@ package io.grpc; * Server server = ServerBuilder.forPort(1234).addService(new RouteGuideService()).build(); *

*/ -@ExperimentalApi +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1701") public interface BindableService { /** * Creates {@link ServerServiceDefinition} object for current instance of service implementation. diff --git a/core/src/main/java/io/grpc/CallOptions.java b/core/src/main/java/io/grpc/CallOptions.java index f9968034f4..3f16603bcd 100644 --- a/core/src/main/java/io/grpc/CallOptions.java +++ b/core/src/main/java/io/grpc/CallOptions.java @@ -75,7 +75,7 @@ public final class CallOptions { * verification of the overridden value, such as making sure the authority matches the server's * TLS certificate. */ - @ExperimentalApi("https://github.com/grpc/grpc-java/issues/67") + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1767") public CallOptions withAuthority(@Nullable String authority) { CallOptions newOptions = new CallOptions(this); newOptions.authority = authority; @@ -86,7 +86,7 @@ public final class CallOptions { * Sets the compression to use for the call. The compressor must be a valid name known in the * {@link CompressorRegistry}. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") public CallOptions withCompression(@Nullable String compressorName) { CallOptions newOptions = new CallOptions(this); newOptions.compressorName = compressorName; @@ -101,7 +101,7 @@ public final class CallOptions { * * @param deadline the deadline or {@code null} for unsetting the deadline. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1706") public CallOptions withDeadline(@Nullable Deadline deadline) { CallOptions newOptions = new CallOptions(this); newOptions.deadline = deadline; @@ -152,7 +152,7 @@ public final class CallOptions { /** * Returns the deadline or {@code null} if the deadline is not set. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1706") @Nullable public Deadline getDeadline() { return deadline; @@ -161,7 +161,7 @@ public final class CallOptions { /** * Returns a new {@code CallOptions} with attributes for affinity-based routing. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1766") public CallOptions withAffinity(Attributes affinity) { CallOptions newOptions = new CallOptions(this); newOptions.affinity = Preconditions.checkNotNull(affinity); @@ -171,16 +171,15 @@ public final class CallOptions { /** * Returns the attributes for affinity-based routing. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1766") public Attributes getAffinity() { return affinity; } - /** * Returns the compressor's name. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") @Nullable public String getCompressor() { return compressorName; @@ -196,7 +195,7 @@ public final class CallOptions { * TLS certificate. */ @Nullable - @ExperimentalApi("https://github.com/grpc/grpc-java/issues/67") + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1767") public String getAuthority() { return authority; } diff --git a/core/src/main/java/io/grpc/ClientCall.java b/core/src/main/java/io/grpc/ClientCall.java index 8493460386..3b9dcd016d 100644 --- a/core/src/main/java/io/grpc/ClientCall.java +++ b/core/src/main/java/io/grpc/ClientCall.java @@ -221,7 +221,7 @@ public abstract class ClientCall { * Enables per-message compression, if an encoding type has been negotiated. If no message * encoding has been negotiated, this is a no-op. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1703") public void setMessageCompression(boolean enabled) { // noop } diff --git a/core/src/main/java/io/grpc/Codec.java b/core/src/main/java/io/grpc/Codec.java index ab91f5654e..4fb3084592 100644 --- a/core/src/main/java/io/grpc/Codec.java +++ b/core/src/main/java/io/grpc/Codec.java @@ -41,7 +41,7 @@ import java.util.zip.GZIPOutputStream; * Encloses classes related to the compression and decompression of messages. * */ -@ExperimentalApi("https://github.com/grpc/grpc-java/issues/492") +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") public interface Codec extends Compressor, Decompressor { /** * A gzip compressor and decompressor. In the future this will likely support other diff --git a/core/src/main/java/io/grpc/Compressor.java b/core/src/main/java/io/grpc/Compressor.java index b172ee8f5e..85fe97b885 100644 --- a/core/src/main/java/io/grpc/Compressor.java +++ b/core/src/main/java/io/grpc/Compressor.java @@ -37,7 +37,7 @@ import java.io.OutputStream; /** * Represents a message compressor. */ -@ExperimentalApi("https://github.com/grpc/grpc-java/issues/492") +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") public interface Compressor { /** * Returns the message encoding that this compressor uses. diff --git a/core/src/main/java/io/grpc/CompressorRegistry.java b/core/src/main/java/io/grpc/CompressorRegistry.java index 65fe540fbd..616c7cd246 100644 --- a/core/src/main/java/io/grpc/CompressorRegistry.java +++ b/core/src/main/java/io/grpc/CompressorRegistry.java @@ -45,7 +45,7 @@ import javax.annotation.concurrent.ThreadSafe; /** * Encloses classes related to the compression and decompression of messages. */ -@ExperimentalApi("https://github.com/grpc/grpc-java/issues/492") +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") @ThreadSafe public final class CompressorRegistry { private static final CompressorRegistry DEFAULT_INSTANCE = new CompressorRegistry( diff --git a/core/src/main/java/io/grpc/Context.java b/core/src/main/java/io/grpc/Context.java index beac93bcd3..36ead706d4 100644 --- a/core/src/main/java/io/grpc/Context.java +++ b/core/src/main/java/io/grpc/Context.java @@ -106,7 +106,7 @@ import javax.annotation.Nullable; * responsibility of the application to ensure that all contexts are properly cancelled. * */ -@ExperimentalApi("https://github.com/grpc/grpc-java/issues/262") +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1705") public class Context { private static final Logger LOG = Logger.getLogger(Context.class.getName()); diff --git a/core/src/main/java/io/grpc/Contexts.java b/core/src/main/java/io/grpc/Contexts.java index 48f730da07..8035cfbe4d 100644 --- a/core/src/main/java/io/grpc/Contexts.java +++ b/core/src/main/java/io/grpc/Contexts.java @@ -38,6 +38,7 @@ import java.util.concurrent.TimeoutException; /** * Utility methods for working with {@link Context}s in GRPC. */ +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1705") public class Contexts { private Contexts() { @@ -142,7 +143,7 @@ public class Contexts { * Returns the {@link Status} of a cancelled context or {@code null} if the context * is not cancelled. */ - @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1737") + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1705") public static Status statusFromCancelled(Context context) { Preconditions.checkNotNull(context, "context must not be null"); if (!context.isCancelled()) { diff --git a/core/src/main/java/io/grpc/Deadline.java b/core/src/main/java/io/grpc/Deadline.java index 1ea689e949..eb59c0757a 100644 --- a/core/src/main/java/io/grpc/Deadline.java +++ b/core/src/main/java/io/grpc/Deadline.java @@ -41,7 +41,7 @@ import java.util.concurrent.TimeUnit; /** * An absolute deadline in system time. */ -@ExperimentalApi("https://github.com/grpc/grpc-java/issues/262") +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1706") public final class Deadline implements Comparable { private static final SystemTicker SYSTEM_TICKER = new SystemTicker(); // nanoTime has a range of just under 300 years. Only allow up to 100 years in the past or future diff --git a/core/src/main/java/io/grpc/Decompressor.java b/core/src/main/java/io/grpc/Decompressor.java index a80499536f..108c3515bd 100644 --- a/core/src/main/java/io/grpc/Decompressor.java +++ b/core/src/main/java/io/grpc/Decompressor.java @@ -37,7 +37,7 @@ import java.io.InputStream; /** * Represents a message decompressor. */ -@ExperimentalApi("https://github.com/grpc/grpc-java/issues/492") +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") public interface Decompressor { /** * Returns the message encoding that this compressor uses. diff --git a/core/src/main/java/io/grpc/DecompressorRegistry.java b/core/src/main/java/io/grpc/DecompressorRegistry.java index a11fbf16dd..cb454ff4df 100644 --- a/core/src/main/java/io/grpc/DecompressorRegistry.java +++ b/core/src/main/java/io/grpc/DecompressorRegistry.java @@ -49,7 +49,7 @@ import javax.annotation.concurrent.ThreadSafe; /** * Encloses classes related to the compression and decompression of messages. */ -@ExperimentalApi("https://github.com/grpc/grpc-java/issues/492") +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") @ThreadSafe public final class DecompressorRegistry { @@ -93,7 +93,7 @@ public final class DecompressorRegistry { *

The specification doesn't say anything about ordering, or preference, so the returned codes * can be arbitrary. */ - @ExperimentalApi("https://github.com/grpc/grpc-java/issues/492") + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") public Set getAdvertisedMessageEncodings() { Set advertisedDecompressors = new HashSet(decompressors.size()); for (Entry entry : decompressors.entrySet()) { diff --git a/core/src/main/java/io/grpc/DnsNameResolverFactory.java b/core/src/main/java/io/grpc/DnsNameResolverFactory.java index ffea07024d..58edfe3225 100644 --- a/core/src/main/java/io/grpc/DnsNameResolverFactory.java +++ b/core/src/main/java/io/grpc/DnsNameResolverFactory.java @@ -52,7 +52,7 @@ import java.net.URI; *

  • {@code "dns:///foo.googleapis.com"} (without port)
  • * */ -@ExperimentalApi +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1769") public final class DnsNameResolverFactory extends NameResolver.Factory { private static final String SCHEME = "dns"; diff --git a/core/src/main/java/io/grpc/EquivalentAddressGroup.java b/core/src/main/java/io/grpc/EquivalentAddressGroup.java index 49efbbf6a0..3d399d59f5 100644 --- a/core/src/main/java/io/grpc/EquivalentAddressGroup.java +++ b/core/src/main/java/io/grpc/EquivalentAddressGroup.java @@ -45,7 +45,7 @@ import java.util.List; * them is equally sufficient. They do have order. An address appears earlier on the list is likely * to be tried earlier. */ -@ExperimentalApi +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770") public final class EquivalentAddressGroup { private final List addrs; diff --git a/core/src/main/java/io/grpc/LoadBalancer.java b/core/src/main/java/io/grpc/LoadBalancer.java index 31eb3d1d51..12b720e089 100644 --- a/core/src/main/java/io/grpc/LoadBalancer.java +++ b/core/src/main/java/io/grpc/LoadBalancer.java @@ -46,7 +46,7 @@ import javax.annotation.concurrent.ThreadSafe; */ // TODO(zhangkun83): since it's also used for non-loadbalancing cases like pick-first, // "RequestRouter" might be a better name. -@ExperimentalApi +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1771") @ThreadSafe public abstract class LoadBalancer { /** @@ -57,6 +57,7 @@ public abstract class LoadBalancer { * * @param affinity for affinity-based routing */ + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1766") public abstract T pickTransport(Attributes affinity); /** diff --git a/core/src/main/java/io/grpc/ManagedChannelBuilder.java b/core/src/main/java/io/grpc/ManagedChannelBuilder.java index b9b8246b12..93bce2fc1d 100644 --- a/core/src/main/java/io/grpc/ManagedChannelBuilder.java +++ b/core/src/main/java/io/grpc/ManagedChannelBuilder.java @@ -72,7 +72,7 @@ public abstract class ManagedChannelBuilder> *
  • {@code "[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443"}
  • * */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1773") public static ManagedChannelBuilder forTarget(String target) { return ManagedChannelProvider.provider().builderForTarget(target); } @@ -129,7 +129,7 @@ public abstract class ManagedChannelBuilder> * *

    Should only used by tests. */ - @ExperimentalApi("primarily for testing") + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1767") public abstract T overrideAuthority(String authority); /* @@ -142,7 +142,7 @@ public abstract class ManagedChannelBuilder> * @param skipNegotiation @{code true} if there is a priori knowledge that the endpoint supports * plaintext, {@code false} if plaintext use must be negotiated. */ - @ExperimentalApi("primarily for testing") + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1772") public abstract T usePlaintext(boolean skipNegotiation); /* @@ -151,7 +151,7 @@ public abstract class ManagedChannelBuilder> *

    If this method is not called, the builder will look up in the global resolver registry for * a factory for the provided target. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770") public abstract T nameResolverFactory(NameResolver.Factory resolverFactory); /** @@ -160,7 +160,7 @@ public abstract class ManagedChannelBuilder> *

    If this method is not called, the builder will use {@link SimpleLoadBalancerFactory} for the * channel. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1771") public abstract T loadBalancerFactory(LoadBalancer.Factory loadBalancerFactory); /** @@ -168,7 +168,7 @@ public abstract class ManagedChannelBuilder> * shouldn't be used unless you are using custom message encoding. The default supported * decompressors are in {@code DecompressorRegistry.getDefaultInstance}. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") public abstract T decompressorRegistry(DecompressorRegistry registry); /** @@ -176,7 +176,7 @@ public abstract class ManagedChannelBuilder> * shouldn't be used unless you are using custom message encoding. The default supported * compressors are in {@code CompressorRegistry.getDefaultInstance}. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") public abstract T compressorRegistry(CompressorRegistry registry); /** diff --git a/core/src/main/java/io/grpc/ManagedChannelProvider.java b/core/src/main/java/io/grpc/ManagedChannelProvider.java index 35716e56f3..2741e20e3e 100644 --- a/core/src/main/java/io/grpc/ManagedChannelProvider.java +++ b/core/src/main/java/io/grpc/ManagedChannelProvider.java @@ -130,7 +130,6 @@ public abstract class ManagedChannelProvider { /** * Creates a new builder with the given target URI. */ - @ExperimentalApi protected abstract ManagedChannelBuilder builderForTarget(String target); public static final class ProviderNotFoundException extends RuntimeException { diff --git a/core/src/main/java/io/grpc/MethodDescriptor.java b/core/src/main/java/io/grpc/MethodDescriptor.java index 2f679681e8..7d391fa27a 100644 --- a/core/src/main/java/io/grpc/MethodDescriptor.java +++ b/core/src/main/java/io/grpc/MethodDescriptor.java @@ -143,7 +143,7 @@ public class MethodDescriptor { * @param requestMarshaller the marshaller used to encode and decode requests * @param responseMarshaller the marshaller used to encode and decode responses */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1774") public static MethodDescriptor create( MethodType type, String fullMethodName, Marshaller requestMarshaller, @@ -220,7 +220,7 @@ public class MethodDescriptor { /** * Returns whether this method is idempotent. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1775") public boolean isIdempotent() { return idempotent; } @@ -231,7 +231,7 @@ public class MethodDescriptor { * @param idempotent the idempotency of this method. * @return a new copy of MethodDescriptor. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1775") public MethodDescriptor withIdempotent(boolean idempotent) { return new MethodDescriptor(type, fullMethodName, requestMarshaller, responseMarshaller, idempotent); @@ -243,7 +243,7 @@ public class MethodDescriptor { * @param fullServiceName the fully qualified service name that is prefixed with the package name * @param methodName the short method name */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1774") public static String generateFullMethodName(String fullServiceName, String methodName) { return fullServiceName + "/" + methodName; } @@ -253,7 +253,7 @@ public class MethodDescriptor { * {@code null} if the input is malformed, but you cannot rely on it for the validity of the * input. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1774") @Nullable public static String extractFullServiceName(String fullMethodName) { int index = fullMethodName.lastIndexOf('/'); diff --git a/core/src/main/java/io/grpc/NameResolver.java b/core/src/main/java/io/grpc/NameResolver.java index 3e52107436..2699fdecd4 100644 --- a/core/src/main/java/io/grpc/NameResolver.java +++ b/core/src/main/java/io/grpc/NameResolver.java @@ -46,7 +46,7 @@ import javax.annotation.concurrent.ThreadSafe; *

    The addresses and attributes of a target may be changed over time, thus the caller registers a * {@link Listener} to receive continuous updates. */ -@ExperimentalApi +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770") @ThreadSafe public abstract class NameResolver { /** diff --git a/core/src/main/java/io/grpc/NameResolverRegistry.java b/core/src/main/java/io/grpc/NameResolverRegistry.java index c22055938f..6105443191 100644 --- a/core/src/main/java/io/grpc/NameResolverRegistry.java +++ b/core/src/main/java/io/grpc/NameResolverRegistry.java @@ -42,7 +42,7 @@ import javax.annotation.concurrent.ThreadSafe; * A registry that holds various {@link NameResolver.Factory}s and dispatches target URI to the * first one that can handle it. */ -@ExperimentalApi +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770") @ThreadSafe public final class NameResolverRegistry extends NameResolver.Factory { private static final NameResolverRegistry defaultRegistry = diff --git a/core/src/main/java/io/grpc/PartialForwardingServerCall.java b/core/src/main/java/io/grpc/PartialForwardingServerCall.java index 67171d2f59..8af0751ca9 100644 --- a/core/src/main/java/io/grpc/PartialForwardingServerCall.java +++ b/core/src/main/java/io/grpc/PartialForwardingServerCall.java @@ -67,13 +67,13 @@ abstract class PartialForwardingServerCall extends ServerCall { } @Override - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1703") public void setMessageCompression(boolean enabled) { delegate().setMessageCompression(enabled); } @Override - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") public void setCompression(String compressor) { delegate().setCompression(compressor); } diff --git a/core/src/main/java/io/grpc/ResolvedServerInfo.java b/core/src/main/java/io/grpc/ResolvedServerInfo.java index 2e914de3ab..17f7d60d46 100644 --- a/core/src/main/java/io/grpc/ResolvedServerInfo.java +++ b/core/src/main/java/io/grpc/ResolvedServerInfo.java @@ -38,7 +38,7 @@ import javax.annotation.concurrent.Immutable; /** * The information about a server from a {@link NameResolver}. */ -@ExperimentalApi +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770") @Immutable public final class ResolvedServerInfo { private final SocketAddress address; diff --git a/core/src/main/java/io/grpc/ServerBuilder.java b/core/src/main/java/io/grpc/ServerBuilder.java index 1d05e27bcb..dd594dd6a8 100644 --- a/core/src/main/java/io/grpc/ServerBuilder.java +++ b/core/src/main/java/io/grpc/ServerBuilder.java @@ -103,7 +103,7 @@ public abstract class ServerBuilder> { * shouldn't be used unless you are using custom message encoding. The default supported * decompressors are in {@code DecompressorRegistry.getDefaultInstance}. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") public abstract T decompressorRegistry(DecompressorRegistry registry); /** @@ -111,7 +111,7 @@ public abstract class ServerBuilder> { * shouldn't be used unless you are using custom message encoding. The default supported * compressors are in {@code CompressorRegistry.getDefaultInstance}. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") public abstract T compressorRegistry(CompressorRegistry registry); /** diff --git a/core/src/main/java/io/grpc/ServerCall.java b/core/src/main/java/io/grpc/ServerCall.java index bd86c70371..d1cf55791e 100644 --- a/core/src/main/java/io/grpc/ServerCall.java +++ b/core/src/main/java/io/grpc/ServerCall.java @@ -196,7 +196,7 @@ public abstract class ServerCall { * Enables per-message compression, if an encoding type has been negotiated. If no message * encoding has been negotiated, this is a no-op. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") public void setMessageCompression(boolean enabled) { // noop } @@ -210,7 +210,7 @@ public abstract class ServerCall { * @param compressor the name of the compressor to use. * @throws IllegalArgumentException if the compressor name can not be found. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") public void setCompression(String compressor) { // noop } diff --git a/core/src/main/java/io/grpc/ServerCallHandler.java b/core/src/main/java/io/grpc/ServerCallHandler.java index f0b0978f41..4903655031 100644 --- a/core/src/main/java/io/grpc/ServerCallHandler.java +++ b/core/src/main/java/io/grpc/ServerCallHandler.java @@ -37,7 +37,7 @@ import javax.annotation.concurrent.ThreadSafe; * Interface to initiate processing of incoming remote calls. Advanced applications and generated * code will implement this interface to allows {@link Server}s to invoke service methods. */ -@ExperimentalApi +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/933") @ThreadSafe public interface ServerCallHandler { /** diff --git a/core/src/main/java/io/grpc/ServerMethodDefinition.java b/core/src/main/java/io/grpc/ServerMethodDefinition.java index 73203d69d5..b136eb9733 100644 --- a/core/src/main/java/io/grpc/ServerMethodDefinition.java +++ b/core/src/main/java/io/grpc/ServerMethodDefinition.java @@ -36,7 +36,7 @@ package io.grpc; * * @see ServerServiceDefinition */ -@ExperimentalApi +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1774") public final class ServerMethodDefinition { private final MethodDescriptor method; private final ServerCallHandler handler; diff --git a/core/src/main/java/io/grpc/ServerServiceDefinition.java b/core/src/main/java/io/grpc/ServerServiceDefinition.java index f4b99daeb6..6cf656a062 100644 --- a/core/src/main/java/io/grpc/ServerServiceDefinition.java +++ b/core/src/main/java/io/grpc/ServerServiceDefinition.java @@ -46,7 +46,7 @@ import java.util.Map; // consider removing ServerServiceDefinition to and let the registry to have a big map of // handlers. public final class ServerServiceDefinition { - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1774") public static Builder builder(String serviceName) { return new Builder(serviceName); } @@ -65,7 +65,7 @@ public final class ServerServiceDefinition { return name; } - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1774") public Collection> getMethods() { return methods.values(); } @@ -82,7 +82,7 @@ public final class ServerServiceDefinition { /** Builder for constructing Service instances. */ public static final class Builder { private final String serviceName; - private final Map> methods = + private final Map> methods = new HashMap>(); private Builder(String serviceName) { @@ -95,7 +95,7 @@ public final class ServerServiceDefinition { * @param method the {@link MethodDescriptor} of this method. * @param handler handler for incoming calls */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1774") public Builder addMethod( MethodDescriptor method, ServerCallHandler handler) { return addMethod(ServerMethodDefinition.create( @@ -104,7 +104,7 @@ public final class ServerServiceDefinition { } /** Add a method to be supported by the service. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1774") public Builder addMethod(ServerMethodDefinition def) { MethodDescriptor method = def.getMethodDescriptor(); checkArgument( diff --git a/core/src/main/java/io/grpc/SimpleLoadBalancerFactory.java b/core/src/main/java/io/grpc/SimpleLoadBalancerFactory.java index 5d9006877a..ebeff49582 100644 --- a/core/src/main/java/io/grpc/SimpleLoadBalancerFactory.java +++ b/core/src/main/java/io/grpc/SimpleLoadBalancerFactory.java @@ -46,7 +46,7 @@ import javax.annotation.concurrent.GuardedBy; * addresses from the {@link NameResolver}. */ // TODO(zhangkun83): Only pick-first is implemented. We need to implement round-robin. -@ExperimentalApi +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1771") public final class SimpleLoadBalancerFactory extends LoadBalancer.Factory { private static final SimpleLoadBalancerFactory instance = new SimpleLoadBalancerFactory(); diff --git a/core/src/main/java/io/grpc/internal/AbstractManagedChannelImplBuilder.java b/core/src/main/java/io/grpc/internal/AbstractManagedChannelImplBuilder.java index 423be93fe2..ae10d4e63e 100644 --- a/core/src/main/java/io/grpc/internal/AbstractManagedChannelImplBuilder.java +++ b/core/src/main/java/io/grpc/internal/AbstractManagedChannelImplBuilder.java @@ -40,7 +40,6 @@ import io.grpc.Attributes; import io.grpc.ClientInterceptor; import io.grpc.CompressorRegistry; import io.grpc.DecompressorRegistry; -import io.grpc.ExperimentalApi; import io.grpc.LoadBalancer; import io.grpc.ManagedChannelBuilder; import io.grpc.NameResolver; @@ -146,14 +145,12 @@ public abstract class AbstractManagedChannelImplBuilder } @Override - @ExperimentalApi public final T decompressorRegistry(DecompressorRegistry registry) { this.decompressorRegistry = registry; return thisT(); } @Override - @ExperimentalApi public final T compressorRegistry(CompressorRegistry registry) { this.compressorRegistry = registry; return thisT(); diff --git a/core/src/main/java/io/grpc/internal/ContextRunnable.java b/core/src/main/java/io/grpc/internal/ContextRunnable.java index 5316bcb4f4..939dabc448 100644 --- a/core/src/main/java/io/grpc/internal/ContextRunnable.java +++ b/core/src/main/java/io/grpc/internal/ContextRunnable.java @@ -32,13 +32,11 @@ package io.grpc.internal; import io.grpc.Context; -import io.grpc.ExperimentalApi; /** * Utility base implementation of {@link Runnable} that performs the same function as * {@link Context#wrap(Runnable)} without requiring the construction of an additional object. */ -@ExperimentalApi abstract class ContextRunnable implements Runnable { private final Context context; diff --git a/stub/src/main/java/io/grpc/stub/AbstractStub.java b/stub/src/main/java/io/grpc/stub/AbstractStub.java index 6e60218b4f..a16ca75b37 100644 --- a/stub/src/main/java/io/grpc/stub/AbstractStub.java +++ b/stub/src/main/java/io/grpc/stub/AbstractStub.java @@ -106,7 +106,7 @@ public abstract class AbstractStub> { * * @param deadline the deadline or {@code null} for unsetting the deadline. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1706") public final S withDeadline(@Nullable Deadline deadline) { return build(channel, callOptions.withDeadline(deadline)); } @@ -144,7 +144,7 @@ public abstract class AbstractStub> { * * @param compressorName the name (e.g. "gzip") of the compressor to use. */ - @ExperimentalApi + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") public final S withCompression(String compressorName) { return build(channel, callOptions.withCompression(compressorName)); }