Skip to content

Commit 2cead63

Browse files
committed
Add ExperimentalApi to new blocking BlockingClientCall generated methods
1 parent 663480b commit 2cead63

File tree

23 files changed

+95
-0
lines changed

23 files changed

+95
-0
lines changed

alts/src/generated/main/grpc/io/grpc/alts/internal/HandshakerServiceGrpc.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ protected HandshakerServiceBlockingV2Stub build(
195195
* response before sending next request.
196196
* </pre>
197197
*/
198+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
198199
public io.grpc.stub.BlockingClientCall<io.grpc.alts.internal.HandshakerReq, io.grpc.alts.internal.HandshakerResp>
199200
doHandshake() {
200201
return io.grpc.stub.ClientCalls.blockingBidiStreamingCall(

android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ protected MetricsServiceBlockingV2Stub build(
233233
* the service
234234
* </pre>
235235
*/
236+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
236237
public io.grpc.stub.BlockingClientCall<?, io.grpc.testing.integration.Metrics.GaugeResponse>
237238
getAllGauges(io.grpc.testing.integration.Metrics.EmptyMessage request) throws java.lang.InterruptedException,
238239
io.grpc.StatusException {

android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/TestServiceGrpc.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ public io.grpc.testing.integration.Messages.SimpleResponse cacheableUnaryCall(io
609609
* The server returns the payload with client desired type and sizes.
610610
* </pre>
611611
*/
612+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
612613
public io.grpc.stub.BlockingClientCall<?, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>
613614
streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request) throws java.lang.InterruptedException,
614615
io.grpc.StatusException {
@@ -622,6 +623,7 @@ public io.grpc.testing.integration.Messages.SimpleResponse cacheableUnaryCall(io
622623
* The server returns the aggregated size of client payload as the result.
623624
* </pre>
624625
*/
626+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
625627
public io.grpc.stub.BlockingClientCall<io.grpc.testing.integration.Messages.StreamingInputCallRequest, io.grpc.testing.integration.Messages.StreamingInputCallResponse>
626628
streamingInputCall() {
627629
return io.grpc.stub.ClientCalls.blockingClientStreamingCall(
@@ -635,6 +637,7 @@ public io.grpc.testing.integration.Messages.SimpleResponse cacheableUnaryCall(io
635637
* demonstrates the idea of full duplexing.
636638
* </pre>
637639
*/
640+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
638641
public io.grpc.stub.BlockingClientCall<io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>
639642
fullDuplexCall() {
640643
return io.grpc.stub.ClientCalls.blockingBidiStreamingCall(
@@ -649,6 +652,7 @@ public io.grpc.testing.integration.Messages.SimpleResponse cacheableUnaryCall(io
649652
* first request.
650653
* </pre>
651654
*/
655+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
652656
public io.grpc.stub.BlockingClientCall<io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>
653657
halfDuplexCall() {
654658
return io.grpc.stub.ClientCalls.blockingBidiStreamingCall(

android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ protected MetricsServiceBlockingV2Stub build(
233233
* the service
234234
* </pre>
235235
*/
236+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
236237
public io.grpc.stub.BlockingClientCall<?, io.grpc.testing.integration.Metrics.GaugeResponse>
237238
getAllGauges(io.grpc.testing.integration.Metrics.EmptyMessage request) throws java.lang.InterruptedException,
238239
io.grpc.StatusException {

android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/TestServiceGrpc.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ public io.grpc.testing.integration.Messages.SimpleResponse cacheableUnaryCall(io
609609
* The server returns the payload with client desired type and sizes.
610610
* </pre>
611611
*/
612+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
612613
public io.grpc.stub.BlockingClientCall<?, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>
613614
streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request) throws java.lang.InterruptedException,
614615
io.grpc.StatusException {
@@ -622,6 +623,7 @@ public io.grpc.testing.integration.Messages.SimpleResponse cacheableUnaryCall(io
622623
* The server returns the aggregated size of client payload as the result.
623624
* </pre>
624625
*/
626+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
625627
public io.grpc.stub.BlockingClientCall<io.grpc.testing.integration.Messages.StreamingInputCallRequest, io.grpc.testing.integration.Messages.StreamingInputCallResponse>
626628
streamingInputCall() {
627629
return io.grpc.stub.ClientCalls.blockingClientStreamingCall(
@@ -635,6 +637,7 @@ public io.grpc.testing.integration.Messages.SimpleResponse cacheableUnaryCall(io
635637
* demonstrates the idea of full duplexing.
636638
* </pre>
637639
*/
640+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
638641
public io.grpc.stub.BlockingClientCall<io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>
639642
fullDuplexCall() {
640643
return io.grpc.stub.ClientCalls.blockingBidiStreamingCall(
@@ -649,6 +652,7 @@ public io.grpc.testing.integration.Messages.SimpleResponse cacheableUnaryCall(io
649652
* first request.
650653
* </pre>
651654
*/
655+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
652656
public io.grpc.stub.BlockingClientCall<io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>
653657
halfDuplexCall() {
654658
return io.grpc.stub.ClientCalls.blockingBidiStreamingCall(

benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/BenchmarkServiceGrpc.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ public io.grpc.benchmarks.proto.Messages.SimpleResponse unaryCall(io.grpc.benchm
413413
* The server returns the client payload as-is on each response
414414
* </pre>
415415
*/
416+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
416417
public io.grpc.stub.BlockingClientCall<io.grpc.benchmarks.proto.Messages.SimpleRequest, io.grpc.benchmarks.proto.Messages.SimpleResponse>
417418
streamingCall() {
418419
return io.grpc.stub.ClientCalls.blockingBidiStreamingCall(
@@ -425,6 +426,7 @@ public io.grpc.benchmarks.proto.Messages.SimpleResponse unaryCall(io.grpc.benchm
425426
* The server returns the client payload as-is once the client does WritesDone
426427
* </pre>
427428
*/
429+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
428430
public io.grpc.stub.BlockingClientCall<io.grpc.benchmarks.proto.Messages.SimpleRequest, io.grpc.benchmarks.proto.Messages.SimpleResponse>
429431
streamingFromClient() {
430432
return io.grpc.stub.ClientCalls.blockingClientStreamingCall(
@@ -437,6 +439,7 @@ public io.grpc.benchmarks.proto.Messages.SimpleResponse unaryCall(io.grpc.benchm
437439
* The server repeatedly returns the client payload as-is
438440
* </pre>
439441
*/
442+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
440443
public io.grpc.stub.BlockingClientCall<?, io.grpc.benchmarks.proto.Messages.SimpleResponse>
441444
streamingFromServer(io.grpc.benchmarks.proto.Messages.SimpleRequest request) throws java.lang.InterruptedException,
442445
io.grpc.StatusException {
@@ -450,6 +453,7 @@ public io.grpc.benchmarks.proto.Messages.SimpleResponse unaryCall(io.grpc.benchm
450453
* Both sides send the content of their own choice to the other
451454
* </pre>
452455
*/
456+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
453457
public io.grpc.stub.BlockingClientCall<io.grpc.benchmarks.proto.Messages.SimpleRequest, io.grpc.benchmarks.proto.Messages.SimpleResponse>
454458
streamingBothWays() {
455459
return io.grpc.stub.ClientCalls.blockingBidiStreamingCall(

benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/WorkerServiceGrpc.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ protected WorkerServiceBlockingV2Stub build(
361361
* this RPC.
362362
* </pre>
363363
*/
364+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
364365
public io.grpc.stub.BlockingClientCall<io.grpc.benchmarks.proto.Control.ServerArgs, io.grpc.benchmarks.proto.Control.ServerStatus>
365366
runServer() {
366367
return io.grpc.stub.ClientCalls.blockingBidiStreamingCall(
@@ -377,6 +378,7 @@ protected WorkerServiceBlockingV2Stub build(
377378
* this RPC.
378379
* </pre>
379380
*/
381+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
380382
public io.grpc.stub.BlockingClientCall<io.grpc.benchmarks.proto.Control.ClientArgs, io.grpc.benchmarks.proto.Control.ClientStatus>
381383
runClient() {
382384
return io.grpc.stub.ClientCalls.blockingBidiStreamingCall(

compiler/src/java_plugin/cpp/java_generator.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,11 @@ static void PrintStub(
698698
p->Print(*vars, "@$Deprecated$\n");
699699
}
700700

701+
if ((call_type == BLOCKING_CALL && client_streaming && server_streaming)
702+
|| (call_type == BLOCKING_V2_CALL && (client_streaming || server_streaming))) {
703+
p->Print(*vars, "@io.grpc.ExperimentalApi(\"https://github.com/grpc/grpc-java/issues/10918\")\n");
704+
}
705+
701706
if (!interface) {
702707
p->Print("public ");
703708
} else {

compiler/src/test/golden/TestService.java.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ public final class TestServiceGrpc {
591591
* The server returns the payload with client desired type and sizes.
592592
* </pre>
593593
*/
594+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
594595
public io.grpc.stub.BlockingClientCall<?, io.grpc.testing.compiler.Test.StreamingOutputCallResponse>
595596
streamingOutputCall(io.grpc.testing.compiler.Test.StreamingOutputCallRequest request) throws java.lang.InterruptedException,
596597
io.grpc.StatusException {
@@ -604,6 +605,7 @@ public final class TestServiceGrpc {
604605
* The server returns the aggregated size of client payload as the result.
605606
* </pre>
606607
*/
608+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
607609
public io.grpc.stub.BlockingClientCall<io.grpc.testing.compiler.Test.StreamingInputCallRequest, io.grpc.testing.compiler.Test.StreamingInputCallResponse>
608610
streamingInputCall() {
609611
return io.grpc.stub.ClientCalls.blockingClientStreamingCall(
@@ -617,6 +619,7 @@ public final class TestServiceGrpc {
617619
* demonstrates the idea of full bidirectionality.
618620
* </pre>
619621
*/
622+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
620623
public io.grpc.stub.BlockingClientCall<io.grpc.testing.compiler.Test.StreamingOutputCallRequest, io.grpc.testing.compiler.Test.StreamingOutputCallResponse>
621624
fullBidiCall() {
622625
return io.grpc.stub.ClientCalls.blockingBidiStreamingCall(
@@ -631,6 +634,7 @@ public final class TestServiceGrpc {
631634
* first request.
632635
* </pre>
633636
*/
637+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
634638
public io.grpc.stub.BlockingClientCall<io.grpc.testing.compiler.Test.StreamingOutputCallRequest, io.grpc.testing.compiler.Test.StreamingOutputCallResponse>
635639
halfBidiCall() {
636640
return io.grpc.stub.ClientCalls.blockingBidiStreamingCall(
@@ -643,6 +647,7 @@ public final class TestServiceGrpc {
643647
* method should have a '_' appended.
644648
* </pre>
645649
*/
650+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
646651
public io.grpc.stub.BlockingClientCall<io.grpc.testing.compiler.Test.StreamingInputCallRequest, io.grpc.testing.compiler.Test.StreamingInputCallResponse>
647652
import_() {
648653
return io.grpc.stub.ClientCalls.blockingBidiStreamingCall(

compiler/src/testLite/golden/TestService.java.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,7 @@ public final class TestServiceGrpc {
580580
* The server returns the payload with client desired type and sizes.
581581
* </pre>
582582
*/
583+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
583584
public io.grpc.stub.BlockingClientCall<?, io.grpc.testing.compiler.Test.StreamingOutputCallResponse>
584585
streamingOutputCall(io.grpc.testing.compiler.Test.StreamingOutputCallRequest request) throws java.lang.InterruptedException,
585586
io.grpc.StatusException {
@@ -593,6 +594,7 @@ public final class TestServiceGrpc {
593594
* The server returns the aggregated size of client payload as the result.
594595
* </pre>
595596
*/
597+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
596598
public io.grpc.stub.BlockingClientCall<io.grpc.testing.compiler.Test.StreamingInputCallRequest, io.grpc.testing.compiler.Test.StreamingInputCallResponse>
597599
streamingInputCall() {
598600
return io.grpc.stub.ClientCalls.blockingClientStreamingCall(
@@ -606,6 +608,7 @@ public final class TestServiceGrpc {
606608
* demonstrates the idea of full bidirectionality.
607609
* </pre>
608610
*/
611+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
609612
public io.grpc.stub.BlockingClientCall<io.grpc.testing.compiler.Test.StreamingOutputCallRequest, io.grpc.testing.compiler.Test.StreamingOutputCallResponse>
610613
fullBidiCall() {
611614
return io.grpc.stub.ClientCalls.blockingBidiStreamingCall(
@@ -620,6 +623,7 @@ public final class TestServiceGrpc {
620623
* first request.
621624
* </pre>
622625
*/
626+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
623627
public io.grpc.stub.BlockingClientCall<io.grpc.testing.compiler.Test.StreamingOutputCallRequest, io.grpc.testing.compiler.Test.StreamingOutputCallResponse>
624628
halfBidiCall() {
625629
return io.grpc.stub.ClientCalls.blockingBidiStreamingCall(
@@ -632,6 +636,7 @@ public final class TestServiceGrpc {
632636
* method should have a '_' appended.
633637
* </pre>
634638
*/
639+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
635640
public io.grpc.stub.BlockingClientCall<io.grpc.testing.compiler.Test.StreamingInputCallRequest, io.grpc.testing.compiler.Test.StreamingInputCallResponse>
636641
import_() {
637642
return io.grpc.stub.ClientCalls.blockingBidiStreamingCall(

0 commit comments

Comments
 (0)