Make setOnReadyThreshold() a noop method instead of abstract. (#11044)

Make setOnReadyThreshold() a noop method instead of abstract
This commit is contained in:
Ran 2024-03-27 14:56:13 -07:00 committed by GitHub
parent 2c5f0c22cd
commit 37263b774d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -16,6 +16,8 @@
package io.grpc.stub;
import static com.google.common.base.Preconditions.checkArgument;
import io.grpc.ExperimentalApi;
/**
@ -75,7 +77,9 @@ public abstract class ServerCallStreamObserver<RespT> extends CallStreamObserver
* positive integer.
*/
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/11021")
public abstract void setOnReadyThreshold(int numBytes);
public void setOnReadyThreshold(int numBytes) {
checkArgument(numBytes > 0, "numBytes must be positive: %s", numBytes);
}
/**
* Sets the compression algorithm to use for the call. May only be called before sending any