api,stub:Stabilize part of compression agreed to in the stabilization meeting (#9942)
* api,stub:Stabilize part of compression agreed to in the stabilization meeting.
addresses part of #1704
diff --git a/api/src/main/java/io/grpc/CallOptions.java b/api/src/main/java/io/grpc/CallOptions.java
index 4b180c5..87493d2 100644
--- a/api/src/main/java/io/grpc/CallOptions.java
+++ b/api/src/main/java/io/grpc/CallOptions.java
@@ -138,13 +138,12 @@
/**
* Sets the compression to use for the call. The compressor must be a valid name known in the
- * {@link CompressorRegistry}.
+ * {@link CompressorRegistry}. By default, the "gzip" compressor will be available.
*
* <p>It is only safe to call this if the server supports the compression format chosen. There is
* no negotiation performed; if the server does not support the compression chosen, the call will
* fail.
*/
- @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704")
public CallOptions withCompression(@Nullable String compressorName) {
Builder builder = toBuilder(this);
builder.compressorName = compressorName;
@@ -207,7 +206,6 @@
/**
* Returns the compressor's name.
*/
- @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704")
@Nullable
public String getCompressor() {
return compressorName;
diff --git a/api/src/main/java/io/grpc/ServerCall.java b/api/src/main/java/io/grpc/ServerCall.java
index 40bcd2f..bf0e6da 100644
--- a/api/src/main/java/io/grpc/ServerCall.java
+++ b/api/src/main/java/io/grpc/ServerCall.java
@@ -189,16 +189,15 @@
* encoding has been negotiated, this is a no-op. By default per-message compression is enabled,
* but may not have any effect if compression is not enabled on the call.
*/
- @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704")
public void setMessageCompression(boolean enabled) {
// noop
}
/**
- * Sets the compression algorithm for this call. If the server does not support the compression
- * algorithm, the call will fail. This method may only be called before {@link #sendHeaders}.
- * The compressor to use will be looked up in the {@link CompressorRegistry}. Default gRPC
- * servers support the "gzip" compressor.
+ * Sets the compression algorithm for this call. This compression is utilized for sending. If
+ * the server does not support the compression algorithm, the call will fail. This method may
+ * only be called before {@link #sendHeaders}. The compressor to use will be looked up in the
+ * {@link CompressorRegistry}. Default gRPC servers support the "gzip" compressor.
*
* <p>It is safe to call this even if the client does not support the compression format chosen.
* The implementation will handle negotiation with the client and may fall back to no compression.
@@ -206,7 +205,6 @@
* @param compressor the name of the compressor to use.
* @throws IllegalArgumentException if the compressor name can not be found.
*/
- @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704")
public void setCompression(String compressor) {
// noop
}