all: Add issues for many of the experimental API annotations

This commit is contained in:
Carl Mastrangelo 2016-05-03 13:03:05 -07:00
parent b5e6d420a3
commit 0f9e3fa2ea
31 changed files with 56 additions and 61 deletions

View File

@ -43,7 +43,7 @@ import javax.annotation.concurrent.Immutable;
/** /**
* An immutable type-safe container of attributes. * An immutable type-safe container of attributes.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1764")
@Immutable @Immutable
public final class Attributes { public final class Attributes {

View File

@ -46,7 +46,7 @@ package io.grpc;
* Server server = ServerBuilder.forPort(1234).addService(new RouteGuideService()).build(); * Server server = ServerBuilder.forPort(1234).addService(new RouteGuideService()).build();
* </code></pre></p> * </code></pre></p>
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1701")
public interface BindableService { public interface BindableService {
/** /**
* Creates {@link ServerServiceDefinition} object for current instance of service implementation. * Creates {@link ServerServiceDefinition} object for current instance of service implementation.

View File

@ -75,7 +75,7 @@ public final class CallOptions {
* verification of the overridden value, such as making sure the authority matches the server's * verification of the overridden value, such as making sure the authority matches the server's
* TLS certificate.</em> * TLS certificate.</em>
*/ */
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/67") @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1767")
public CallOptions withAuthority(@Nullable String authority) { public CallOptions withAuthority(@Nullable String authority) {
CallOptions newOptions = new CallOptions(this); CallOptions newOptions = new CallOptions(this);
newOptions.authority = authority; 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 * Sets the compression to use for the call. The compressor must be a valid name known in the
* {@link CompressorRegistry}. * {@link CompressorRegistry}.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704")
public CallOptions withCompression(@Nullable String compressorName) { public CallOptions withCompression(@Nullable String compressorName) {
CallOptions newOptions = new CallOptions(this); CallOptions newOptions = new CallOptions(this);
newOptions.compressorName = compressorName; newOptions.compressorName = compressorName;
@ -101,7 +101,7 @@ public final class CallOptions {
* *
* @param deadline the deadline or {@code null} for unsetting the deadline. * @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) { public CallOptions withDeadline(@Nullable Deadline deadline) {
CallOptions newOptions = new CallOptions(this); CallOptions newOptions = new CallOptions(this);
newOptions.deadline = deadline; newOptions.deadline = deadline;
@ -152,7 +152,7 @@ public final class CallOptions {
/** /**
* Returns the deadline or {@code null} if the deadline is not set. * Returns the deadline or {@code null} if the deadline is not set.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1706")
@Nullable @Nullable
public Deadline getDeadline() { public Deadline getDeadline() {
return deadline; return deadline;
@ -161,7 +161,7 @@ public final class CallOptions {
/** /**
* Returns a new {@code CallOptions} with attributes for affinity-based routing. * 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) { public CallOptions withAffinity(Attributes affinity) {
CallOptions newOptions = new CallOptions(this); CallOptions newOptions = new CallOptions(this);
newOptions.affinity = Preconditions.checkNotNull(affinity); newOptions.affinity = Preconditions.checkNotNull(affinity);
@ -171,16 +171,15 @@ public final class CallOptions {
/** /**
* Returns the attributes for affinity-based routing. * Returns the attributes for affinity-based routing.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1766")
public Attributes getAffinity() { public Attributes getAffinity() {
return affinity; return affinity;
} }
/** /**
* Returns the compressor's name. * Returns the compressor's name.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704")
@Nullable @Nullable
public String getCompressor() { public String getCompressor() {
return compressorName; return compressorName;
@ -196,7 +195,7 @@ public final class CallOptions {
* TLS certificate.</em> * TLS certificate.</em>
*/ */
@Nullable @Nullable
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/67") @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1767")
public String getAuthority() { public String getAuthority() {
return authority; return authority;
} }

View File

@ -221,7 +221,7 @@ public abstract class ClientCall<ReqT, RespT> {
* Enables per-message compression, if an encoding type has been negotiated. If no message * Enables per-message compression, if an encoding type has been negotiated. If no message
* encoding has been negotiated, this is a no-op. * encoding has been negotiated, this is a no-op.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1703")
public void setMessageCompression(boolean enabled) { public void setMessageCompression(boolean enabled) {
// noop // noop
} }

View File

@ -41,7 +41,7 @@ import java.util.zip.GZIPOutputStream;
* Encloses classes related to the compression and decompression of messages. * 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 { public interface Codec extends Compressor, Decompressor {
/** /**
* A gzip compressor and decompressor. In the future this will likely support other * A gzip compressor and decompressor. In the future this will likely support other

View File

@ -37,7 +37,7 @@ import java.io.OutputStream;
/** /**
* Represents a message compressor. * 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 { public interface Compressor {
/** /**
* Returns the message encoding that this compressor uses. * Returns the message encoding that this compressor uses.

View File

@ -45,7 +45,7 @@ import javax.annotation.concurrent.ThreadSafe;
/** /**
* Encloses classes related to the compression and decompression of messages. * 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 @ThreadSafe
public final class CompressorRegistry { public final class CompressorRegistry {
private static final CompressorRegistry DEFAULT_INSTANCE = new CompressorRegistry( private static final CompressorRegistry DEFAULT_INSTANCE = new CompressorRegistry(

View File

@ -106,7 +106,7 @@ import javax.annotation.Nullable;
* responsibility of the application to ensure that all contexts are properly cancelled.</li> * responsibility of the application to ensure that all contexts are properly cancelled.</li>
* </ul> * </ul>
*/ */
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/262") @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1705")
public class Context { public class Context {
private static final Logger LOG = Logger.getLogger(Context.class.getName()); private static final Logger LOG = Logger.getLogger(Context.class.getName());

View File

@ -38,6 +38,7 @@ import java.util.concurrent.TimeoutException;
/** /**
* Utility methods for working with {@link Context}s in GRPC. * Utility methods for working with {@link Context}s in GRPC.
*/ */
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1705")
public class Contexts { public class Contexts {
private Contexts() { private Contexts() {
@ -142,7 +143,7 @@ public class Contexts {
* Returns the {@link Status} of a cancelled context or {@code null} if the context * Returns the {@link Status} of a cancelled context or {@code null} if the context
* is not cancelled. * 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) { public static Status statusFromCancelled(Context context) {
Preconditions.checkNotNull(context, "context must not be null"); Preconditions.checkNotNull(context, "context must not be null");
if (!context.isCancelled()) { if (!context.isCancelled()) {

View File

@ -41,7 +41,7 @@ import java.util.concurrent.TimeUnit;
/** /**
* An absolute deadline in system time. * 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<Deadline> { public final class Deadline implements Comparable<Deadline> {
private static final SystemTicker SYSTEM_TICKER = new SystemTicker(); 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 // nanoTime has a range of just under 300 years. Only allow up to 100 years in the past or future

View File

@ -37,7 +37,7 @@ import java.io.InputStream;
/** /**
* Represents a message decompressor. * 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 { public interface Decompressor {
/** /**
* Returns the message encoding that this compressor uses. * Returns the message encoding that this compressor uses.

View File

@ -49,7 +49,7 @@ import javax.annotation.concurrent.ThreadSafe;
/** /**
* Encloses classes related to the compression and decompression of messages. * 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 @ThreadSafe
public final class DecompressorRegistry { public final class DecompressorRegistry {
@ -93,7 +93,7 @@ public final class DecompressorRegistry {
* <p>The specification doesn't say anything about ordering, or preference, so the returned codes * <p>The specification doesn't say anything about ordering, or preference, so the returned codes
* can be arbitrary. * can be arbitrary.
*/ */
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/492") @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704")
public Set<String> getAdvertisedMessageEncodings() { public Set<String> getAdvertisedMessageEncodings() {
Set<String> advertisedDecompressors = new HashSet<String>(decompressors.size()); Set<String> advertisedDecompressors = new HashSet<String>(decompressors.size());
for (Entry<String, DecompressorInfo> entry : decompressors.entrySet()) { for (Entry<String, DecompressorInfo> entry : decompressors.entrySet()) {

View File

@ -52,7 +52,7 @@ import java.net.URI;
* <li>{@code "dns:///foo.googleapis.com"} (without port)</li> * <li>{@code "dns:///foo.googleapis.com"} (without port)</li>
* </ul> * </ul>
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1769")
public final class DnsNameResolverFactory extends NameResolver.Factory { public final class DnsNameResolverFactory extends NameResolver.Factory {
private static final String SCHEME = "dns"; private static final String SCHEME = "dns";

View File

@ -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 * them is equally sufficient. They do have order. An address appears earlier on the list is likely
* to be tried earlier. * to be tried earlier.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770")
public final class EquivalentAddressGroup { public final class EquivalentAddressGroup {
private final List<SocketAddress> addrs; private final List<SocketAddress> addrs;

View File

@ -46,7 +46,7 @@ import javax.annotation.concurrent.ThreadSafe;
*/ */
// TODO(zhangkun83): since it's also used for non-loadbalancing cases like pick-first, // TODO(zhangkun83): since it's also used for non-loadbalancing cases like pick-first,
// "RequestRouter" might be a better name. // "RequestRouter" might be a better name.
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1771")
@ThreadSafe @ThreadSafe
public abstract class LoadBalancer<T> { public abstract class LoadBalancer<T> {
/** /**
@ -57,6 +57,7 @@ public abstract class LoadBalancer<T> {
* *
* @param affinity for affinity-based routing * @param affinity for affinity-based routing
*/ */
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1766")
public abstract T pickTransport(Attributes affinity); public abstract T pickTransport(Attributes affinity);
/** /**

View File

@ -72,7 +72,7 @@ public abstract class ManagedChannelBuilder<T extends ManagedChannelBuilder<T>>
* <li>{@code "[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443"}</li> * <li>{@code "[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443"}</li>
* </ul> * </ul>
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1773")
public static ManagedChannelBuilder<?> forTarget(String target) { public static ManagedChannelBuilder<?> forTarget(String target) {
return ManagedChannelProvider.provider().builderForTarget(target); return ManagedChannelProvider.provider().builderForTarget(target);
} }
@ -129,7 +129,7 @@ public abstract class ManagedChannelBuilder<T extends ManagedChannelBuilder<T>>
* *
* <p>Should only used by tests. * <p>Should only used by tests.
*/ */
@ExperimentalApi("primarily for testing") @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1767")
public abstract T overrideAuthority(String authority); public abstract T overrideAuthority(String authority);
/* /*
@ -142,7 +142,7 @@ public abstract class ManagedChannelBuilder<T extends ManagedChannelBuilder<T>>
* @param skipNegotiation @{code true} if there is a priori knowledge that the endpoint supports * @param skipNegotiation @{code true} if there is a priori knowledge that the endpoint supports
* plaintext, {@code false} if plaintext use must be negotiated. * 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); public abstract T usePlaintext(boolean skipNegotiation);
/* /*
@ -151,7 +151,7 @@ public abstract class ManagedChannelBuilder<T extends ManagedChannelBuilder<T>>
* <p>If this method is not called, the builder will look up in the global resolver registry for * <p>If this method is not called, the builder will look up in the global resolver registry for
* a factory for the provided target. * a factory for the provided target.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770")
public abstract T nameResolverFactory(NameResolver.Factory resolverFactory); public abstract T nameResolverFactory(NameResolver.Factory resolverFactory);
/** /**
@ -160,7 +160,7 @@ public abstract class ManagedChannelBuilder<T extends ManagedChannelBuilder<T>>
* <p>If this method is not called, the builder will use {@link SimpleLoadBalancerFactory} for the * <p>If this method is not called, the builder will use {@link SimpleLoadBalancerFactory} for the
* channel. * channel.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1771")
public abstract T loadBalancerFactory(LoadBalancer.Factory loadBalancerFactory); public abstract T loadBalancerFactory(LoadBalancer.Factory loadBalancerFactory);
/** /**
@ -168,7 +168,7 @@ public abstract class ManagedChannelBuilder<T extends ManagedChannelBuilder<T>>
* shouldn't be used unless you are using custom message encoding. The default supported * shouldn't be used unless you are using custom message encoding. The default supported
* decompressors are in {@code DecompressorRegistry.getDefaultInstance}. * decompressors are in {@code DecompressorRegistry.getDefaultInstance}.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704")
public abstract T decompressorRegistry(DecompressorRegistry registry); public abstract T decompressorRegistry(DecompressorRegistry registry);
/** /**
@ -176,7 +176,7 @@ public abstract class ManagedChannelBuilder<T extends ManagedChannelBuilder<T>>
* shouldn't be used unless you are using custom message encoding. The default supported * shouldn't be used unless you are using custom message encoding. The default supported
* compressors are in {@code CompressorRegistry.getDefaultInstance}. * compressors are in {@code CompressorRegistry.getDefaultInstance}.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704")
public abstract T compressorRegistry(CompressorRegistry registry); public abstract T compressorRegistry(CompressorRegistry registry);
/** /**

View File

@ -130,7 +130,6 @@ public abstract class ManagedChannelProvider {
/** /**
* Creates a new builder with the given target URI. * Creates a new builder with the given target URI.
*/ */
@ExperimentalApi
protected abstract ManagedChannelBuilder<?> builderForTarget(String target); protected abstract ManagedChannelBuilder<?> builderForTarget(String target);
public static final class ProviderNotFoundException extends RuntimeException { public static final class ProviderNotFoundException extends RuntimeException {

View File

@ -143,7 +143,7 @@ public class MethodDescriptor<ReqT, RespT> {
* @param requestMarshaller the marshaller used to encode and decode requests * @param requestMarshaller the marshaller used to encode and decode requests
* @param responseMarshaller the marshaller used to encode and decode responses * @param responseMarshaller the marshaller used to encode and decode responses
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1774")
public static <RequestT, ResponseT> MethodDescriptor<RequestT, ResponseT> create( public static <RequestT, ResponseT> MethodDescriptor<RequestT, ResponseT> create(
MethodType type, String fullMethodName, MethodType type, String fullMethodName,
Marshaller<RequestT> requestMarshaller, Marshaller<RequestT> requestMarshaller,
@ -220,7 +220,7 @@ public class MethodDescriptor<ReqT, RespT> {
/** /**
* Returns whether this method is idempotent. * Returns whether this method is idempotent.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1775")
public boolean isIdempotent() { public boolean isIdempotent() {
return idempotent; return idempotent;
} }
@ -231,7 +231,7 @@ public class MethodDescriptor<ReqT, RespT> {
* @param idempotent the idempotency of this method. * @param idempotent the idempotency of this method.
* @return a new copy of MethodDescriptor. * @return a new copy of MethodDescriptor.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1775")
public MethodDescriptor<ReqT, RespT> withIdempotent(boolean idempotent) { public MethodDescriptor<ReqT, RespT> withIdempotent(boolean idempotent) {
return new MethodDescriptor<ReqT, RespT>(type, fullMethodName, requestMarshaller, return new MethodDescriptor<ReqT, RespT>(type, fullMethodName, requestMarshaller,
responseMarshaller, idempotent); responseMarshaller, idempotent);
@ -243,7 +243,7 @@ public class MethodDescriptor<ReqT, RespT> {
* @param fullServiceName the fully qualified service name that is prefixed with the package name * @param fullServiceName the fully qualified service name that is prefixed with the package name
* @param methodName the short method 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) { public static String generateFullMethodName(String fullServiceName, String methodName) {
return fullServiceName + "/" + methodName; return fullServiceName + "/" + methodName;
} }
@ -253,7 +253,7 @@ public class MethodDescriptor<ReqT, RespT> {
* {@code null} if the input is malformed, but you cannot rely on it for the validity of the * {@code null} if the input is malformed, but you cannot rely on it for the validity of the
* input. * input.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1774")
@Nullable @Nullable
public static String extractFullServiceName(String fullMethodName) { public static String extractFullServiceName(String fullMethodName) {
int index = fullMethodName.lastIndexOf('/'); int index = fullMethodName.lastIndexOf('/');

View File

@ -46,7 +46,7 @@ import javax.annotation.concurrent.ThreadSafe;
* <p>The addresses and attributes of a target may be changed over time, thus the caller registers a * <p>The addresses and attributes of a target may be changed over time, thus the caller registers a
* {@link Listener} to receive continuous updates. * {@link Listener} to receive continuous updates.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770")
@ThreadSafe @ThreadSafe
public abstract class NameResolver { public abstract class NameResolver {
/** /**

View File

@ -42,7 +42,7 @@ import javax.annotation.concurrent.ThreadSafe;
* A registry that holds various {@link NameResolver.Factory}s and dispatches target URI to the * A registry that holds various {@link NameResolver.Factory}s and dispatches target URI to the
* first one that can handle it. * first one that can handle it.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770")
@ThreadSafe @ThreadSafe
public final class NameResolverRegistry extends NameResolver.Factory { public final class NameResolverRegistry extends NameResolver.Factory {
private static final NameResolverRegistry defaultRegistry = private static final NameResolverRegistry defaultRegistry =

View File

@ -67,13 +67,13 @@ abstract class PartialForwardingServerCall<RespT> extends ServerCall<RespT> {
} }
@Override @Override
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1703")
public void setMessageCompression(boolean enabled) { public void setMessageCompression(boolean enabled) {
delegate().setMessageCompression(enabled); delegate().setMessageCompression(enabled);
} }
@Override @Override
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704")
public void setCompression(String compressor) { public void setCompression(String compressor) {
delegate().setCompression(compressor); delegate().setCompression(compressor);
} }

View File

@ -38,7 +38,7 @@ import javax.annotation.concurrent.Immutable;
/** /**
* The information about a server from a {@link NameResolver}. * The information about a server from a {@link NameResolver}.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770")
@Immutable @Immutable
public final class ResolvedServerInfo { public final class ResolvedServerInfo {
private final SocketAddress address; private final SocketAddress address;

View File

@ -103,7 +103,7 @@ public abstract class ServerBuilder<T extends ServerBuilder<T>> {
* shouldn't be used unless you are using custom message encoding. The default supported * shouldn't be used unless you are using custom message encoding. The default supported
* decompressors are in {@code DecompressorRegistry.getDefaultInstance}. * decompressors are in {@code DecompressorRegistry.getDefaultInstance}.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704")
public abstract T decompressorRegistry(DecompressorRegistry registry); public abstract T decompressorRegistry(DecompressorRegistry registry);
/** /**
@ -111,7 +111,7 @@ public abstract class ServerBuilder<T extends ServerBuilder<T>> {
* shouldn't be used unless you are using custom message encoding. The default supported * shouldn't be used unless you are using custom message encoding. The default supported
* compressors are in {@code CompressorRegistry.getDefaultInstance}. * compressors are in {@code CompressorRegistry.getDefaultInstance}.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704")
public abstract T compressorRegistry(CompressorRegistry registry); public abstract T compressorRegistry(CompressorRegistry registry);
/** /**

View File

@ -196,7 +196,7 @@ public abstract class ServerCall<RespT> {
* Enables per-message compression, if an encoding type has been negotiated. If no message * Enables per-message compression, if an encoding type has been negotiated. If no message
* encoding has been negotiated, this is a no-op. * encoding has been negotiated, this is a no-op.
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704")
public void setMessageCompression(boolean enabled) { public void setMessageCompression(boolean enabled) {
// noop // noop
} }
@ -210,7 +210,7 @@ public abstract class ServerCall<RespT> {
* @param compressor the name of the compressor to use. * @param compressor the name of the compressor to use.
* @throws IllegalArgumentException if the compressor name can not be found. * @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) { public void setCompression(String compressor) {
// noop // noop
} }

View File

@ -37,7 +37,7 @@ import javax.annotation.concurrent.ThreadSafe;
* Interface to initiate processing of incoming remote calls. Advanced applications and generated * 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. * 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 @ThreadSafe
public interface ServerCallHandler<RequestT, ResponseT> { public interface ServerCallHandler<RequestT, ResponseT> {
/** /**

View File

@ -36,7 +36,7 @@ package io.grpc;
* *
* @see ServerServiceDefinition * @see ServerServiceDefinition
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1774")
public final class ServerMethodDefinition<ReqT, RespT> { public final class ServerMethodDefinition<ReqT, RespT> {
private final MethodDescriptor<ReqT, RespT> method; private final MethodDescriptor<ReqT, RespT> method;
private final ServerCallHandler<ReqT, RespT> handler; private final ServerCallHandler<ReqT, RespT> handler;

View File

@ -46,7 +46,7 @@ import java.util.Map;
// consider removing ServerServiceDefinition to and let the registry to have a big map of // consider removing ServerServiceDefinition to and let the registry to have a big map of
// handlers. // handlers.
public final class ServerServiceDefinition { public final class ServerServiceDefinition {
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1774")
public static Builder builder(String serviceName) { public static Builder builder(String serviceName) {
return new Builder(serviceName); return new Builder(serviceName);
} }
@ -65,7 +65,7 @@ public final class ServerServiceDefinition {
return name; return name;
} }
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1774")
public Collection<ServerMethodDefinition<?, ?>> getMethods() { public Collection<ServerMethodDefinition<?, ?>> getMethods() {
return methods.values(); return methods.values();
} }
@ -82,7 +82,7 @@ public final class ServerServiceDefinition {
/** Builder for constructing Service instances. */ /** Builder for constructing Service instances. */
public static final class Builder { public static final class Builder {
private final String serviceName; private final String serviceName;
private final Map<String, ServerMethodDefinition<?, ?>> methods = private final Map<String, ServerMethodDefinition<?, ?>> methods =
new HashMap<String, ServerMethodDefinition<?, ?>>(); new HashMap<String, ServerMethodDefinition<?, ?>>();
private Builder(String serviceName) { private Builder(String serviceName) {
@ -95,7 +95,7 @@ public final class ServerServiceDefinition {
* @param method the {@link MethodDescriptor} of this method. * @param method the {@link MethodDescriptor} of this method.
* @param handler handler for incoming calls * @param handler handler for incoming calls
*/ */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1774")
public <ReqT, RespT> Builder addMethod( public <ReqT, RespT> Builder addMethod(
MethodDescriptor<ReqT, RespT> method, ServerCallHandler<ReqT, RespT> handler) { MethodDescriptor<ReqT, RespT> method, ServerCallHandler<ReqT, RespT> handler) {
return addMethod(ServerMethodDefinition.create( return addMethod(ServerMethodDefinition.create(
@ -104,7 +104,7 @@ public final class ServerServiceDefinition {
} }
/** Add a method to be supported by the service. */ /** Add a method to be supported by the service. */
@ExperimentalApi @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1774")
public <ReqT, RespT> Builder addMethod(ServerMethodDefinition<ReqT, RespT> def) { public <ReqT, RespT> Builder addMethod(ServerMethodDefinition<ReqT, RespT> def) {
MethodDescriptor<ReqT, RespT> method = def.getMethodDescriptor(); MethodDescriptor<ReqT, RespT> method = def.getMethodDescriptor();
checkArgument( checkArgument(

View File

@ -46,7 +46,7 @@ import javax.annotation.concurrent.GuardedBy;
* addresses from the {@link NameResolver}. * addresses from the {@link NameResolver}.
*/ */
// TODO(zhangkun83): Only pick-first is implemented. We need to implement round-robin. // 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 { public final class SimpleLoadBalancerFactory extends LoadBalancer.Factory {
private static final SimpleLoadBalancerFactory instance = new SimpleLoadBalancerFactory(); private static final SimpleLoadBalancerFactory instance = new SimpleLoadBalancerFactory();

View File

@ -40,7 +40,6 @@ import io.grpc.Attributes;
import io.grpc.ClientInterceptor; import io.grpc.ClientInterceptor;
import io.grpc.CompressorRegistry; import io.grpc.CompressorRegistry;
import io.grpc.DecompressorRegistry; import io.grpc.DecompressorRegistry;
import io.grpc.ExperimentalApi;
import io.grpc.LoadBalancer; import io.grpc.LoadBalancer;
import io.grpc.ManagedChannelBuilder; import io.grpc.ManagedChannelBuilder;
import io.grpc.NameResolver; import io.grpc.NameResolver;
@ -146,14 +145,12 @@ public abstract class AbstractManagedChannelImplBuilder
} }
@Override @Override
@ExperimentalApi
public final T decompressorRegistry(DecompressorRegistry registry) { public final T decompressorRegistry(DecompressorRegistry registry) {
this.decompressorRegistry = registry; this.decompressorRegistry = registry;
return thisT(); return thisT();
} }
@Override @Override
@ExperimentalApi
public final T compressorRegistry(CompressorRegistry registry) { public final T compressorRegistry(CompressorRegistry registry) {
this.compressorRegistry = registry; this.compressorRegistry = registry;
return thisT(); return thisT();

View File

@ -32,13 +32,11 @@
package io.grpc.internal; package io.grpc.internal;
import io.grpc.Context; import io.grpc.Context;
import io.grpc.ExperimentalApi;
/** /**
* Utility base implementation of {@link Runnable} that performs the same function as * Utility base implementation of {@link Runnable} that performs the same function as
* {@link Context#wrap(Runnable)} without requiring the construction of an additional object. * {@link Context#wrap(Runnable)} without requiring the construction of an additional object.
*/ */
@ExperimentalApi
abstract class ContextRunnable implements Runnable { abstract class ContextRunnable implements Runnable {
private final Context context; private final Context context;

View File

@ -106,7 +106,7 @@ public abstract class AbstractStub<S extends AbstractStub<S>> {
* *
* @param deadline the deadline or {@code null} for unsetting the deadline. * @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) { public final S withDeadline(@Nullable Deadline deadline) {
return build(channel, callOptions.withDeadline(deadline)); return build(channel, callOptions.withDeadline(deadline));
} }
@ -144,7 +144,7 @@ public abstract class AbstractStub<S extends AbstractStub<S>> {
* *
* @param compressorName the name (e.g. "gzip") of the compressor to use. * @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) { public final S withCompression(String compressorName) {
return build(channel, callOptions.withCompression(compressorName)); return build(channel, callOptions.withCompression(compressorName));
} }