mirror of https://github.com/grpc/grpc-java.git
all: add tracking issues for all experimental APIs and make it required
Additionally, make Status*Exception.getTrailers() non experimental
This commit is contained in:
parent
696082f52e
commit
85448189ee
|
@ -53,5 +53,5 @@ public @interface ExperimentalApi {
|
|||
/**
|
||||
* Context information such as links to discussion thread, tracking issue etc.
|
||||
*/
|
||||
String value() default "";
|
||||
String value();
|
||||
}
|
||||
|
|
|
@ -366,7 +366,7 @@ public final class Metadata {
|
|||
* Remove all values for the given key without returning them. This is a minor performance
|
||||
* optimization if you do not need the previous values.
|
||||
*/
|
||||
@ExperimentalApi
|
||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4691")
|
||||
public <T> void discardAll(Key<T> key) {
|
||||
if (isEmpty()) {
|
||||
return;
|
||||
|
|
|
@ -19,7 +19,7 @@ package io.grpc;
|
|||
/**
|
||||
* The level of security guarantee in communications.
|
||||
*/
|
||||
@ExperimentalApi
|
||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4692")
|
||||
public enum SecurityLevel {
|
||||
/**
|
||||
* No security guarantee.
|
||||
|
|
|
@ -408,7 +408,7 @@ public final class Status {
|
|||
*
|
||||
* @return the trailers or {@code null} if not found.
|
||||
*/
|
||||
@ExperimentalApi
|
||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4683")
|
||||
public static Metadata trailersFromThrowable(Throwable t) {
|
||||
Throwable cause = checkNotNull(t, "t");
|
||||
while (cause != null) {
|
||||
|
|
|
@ -28,6 +28,11 @@ public class StatusException extends Exception {
|
|||
private final Status status;
|
||||
private final Metadata trailers;
|
||||
|
||||
/**
|
||||
* Constructs an exception with both a status. See also {@link Status#asException()}.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public StatusException(Status status) {
|
||||
this(status, null);
|
||||
}
|
||||
|
@ -35,6 +40,8 @@ public class StatusException extends Exception {
|
|||
/**
|
||||
* Constructs an exception with both a status and trailers. See also
|
||||
* {@link Status#asException(Metadata)}.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public StatusException(Status status, @Nullable Metadata trailers) {
|
||||
super(Status.formatThrowableMessage(status), status.getCause());
|
||||
|
@ -44,6 +51,8 @@ public class StatusException extends Exception {
|
|||
|
||||
/**
|
||||
* Returns the status code as a {@link Status} object.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public final Status getStatus() {
|
||||
return status;
|
||||
|
@ -51,8 +60,9 @@ public class StatusException extends Exception {
|
|||
|
||||
/**
|
||||
* Returns the received trailers.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@ExperimentalApi
|
||||
public final Metadata getTrailers() {
|
||||
return trailers;
|
||||
}
|
||||
|
|
|
@ -29,6 +29,11 @@ public class StatusRuntimeException extends RuntimeException {
|
|||
private final Status status;
|
||||
private final Metadata trailers;
|
||||
|
||||
/**
|
||||
* Constructs the exception with both a status. See also {@link Status#asException()}.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public StatusRuntimeException(Status status) {
|
||||
this(status, null);
|
||||
}
|
||||
|
@ -36,6 +41,8 @@ public class StatusRuntimeException extends RuntimeException {
|
|||
/**
|
||||
* Constructs the exception with both a status and trailers. See also
|
||||
* {@link Status#asException(Metadata)}.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public StatusRuntimeException(Status status, @Nullable Metadata trailers) {
|
||||
super(Status.formatThrowableMessage(status), status.getCause());
|
||||
|
@ -45,6 +52,8 @@ public class StatusRuntimeException extends RuntimeException {
|
|||
|
||||
/**
|
||||
* Returns the status code as a {@link Status} object.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public final Status getStatus() {
|
||||
return status;
|
||||
|
@ -52,8 +61,9 @@ public class StatusRuntimeException extends RuntimeException {
|
|||
|
||||
/**
|
||||
* Returns the received trailers.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@ExperimentalApi
|
||||
public final Metadata getTrailers() {
|
||||
return trailers;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ import io.grpc.protobuf.lite.ProtoLiteUtils;
|
|||
import javax.annotation.Nullable;
|
||||
|
||||
/** Utility methods for working with {@link com.google.rpc.Status}. */
|
||||
@ExperimentalApi
|
||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4695")
|
||||
public final class StatusProto {
|
||||
private StatusProto() {}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import io.grpc.health.v1.HealthCheckResponse.ServingStatus;
|
|||
* {@link #getHealthService()} method.
|
||||
* The health status manager can update the health statuses of the server.
|
||||
*/
|
||||
@io.grpc.ExperimentalApi
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/4696")
|
||||
public final class HealthStatusManager {
|
||||
|
||||
private final HealthServiceImpl healthService;
|
||||
|
|
|
@ -22,7 +22,7 @@ import io.grpc.ExperimentalApi;
|
|||
* Specialization of {@link StreamObserver} implemented by clients in order to interact with the
|
||||
* advanced features of a call such as flow-control.
|
||||
*/
|
||||
@ExperimentalApi
|
||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4693")
|
||||
public interface ClientResponseObserver<ReqT, RespT> extends StreamObserver<RespT> {
|
||||
/**
|
||||
* Called by the runtime priot to the start of a call to provide a reference to the
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.util.Iterator;
|
|||
* Utility functions for working with {@link StreamObserver} and it's common subclasses like
|
||||
* {@link CallStreamObserver}.
|
||||
*/
|
||||
@ExperimentalApi
|
||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4694")
|
||||
public final class StreamObservers {
|
||||
/**
|
||||
* Copy the values of an {@link Iterator} to the target {@link CallStreamObserver} while properly
|
||||
|
|
Loading…
Reference in New Issue