@BetaApi(value="The surface for tracing is not stable and might change in the future") @InternalApi(value="For internal use by google-cloud-java clients only") public final class TracedServerStreamingCallable<RequestT,ResponseT> extends ServerStreamingCallable<RequestT,ResponseT>
For internal use only.
| Constructor and Description |
|---|
TracedServerStreamingCallable(ServerStreamingCallable<RequestT,ResponseT> innerCallable,
ApiTracerFactory tracerFactory,
SpanName spanName) |
| Modifier and Type | Method and Description |
|---|---|
UnaryCallable<RequestT,List<ResponseT>> |
all()
Construct a
UnaryCallable that will buffer the entire stream into memory before
completing. |
void |
call(RequestT request,
ResponseObserver<ResponseT> responseObserver,
ApiCallContext context)
Conduct a server streaming call with the given
ApiCallContext. |
UnaryCallable<RequestT,ResponseT> |
first()
Construct a
UnaryCallable that will yield the first item in the stream and cancel it. |
blockingServerStreamingCall, blockingServerStreamingCall, call, call, call, serverStreamingCall, serverStreamingCall, withDefaultCallContextpublic TracedServerStreamingCallable(@Nonnull ServerStreamingCallable<RequestT,ResponseT> innerCallable, @Nonnull ApiTracerFactory tracerFactory, @Nonnull SpanName spanName)
public void call(RequestT request, ResponseObserver<ResponseT> responseObserver, ApiCallContext context)
ServerStreamingCallableApiCallContext.call in class ServerStreamingCallable<RequestT,ResponseT>request - requestresponseObserver - ResponseObserver to observe the streaming responsescontext - ApiCallContext to provide context information for the RPC call.public UnaryCallable<RequestT,ResponseT> first()
ServerStreamingCallableUnaryCallable that will yield the first item in the stream and cancel it.
If the stream is empty, the item will be null.
Example usage:
StreamingCallable<String> streamingCallable = // ..
String theResult = streamingCallable.first().call(request);
ApiFuture<String> theResult = streamingCallable.first().futureCall(request);
first in class ServerStreamingCallable<RequestT,ResponseT>UnaryCallable.public UnaryCallable<RequestT,List<ResponseT>> all()
ServerStreamingCallableUnaryCallable that will buffer the entire stream into memory before
completing. If the stream is empty, then the list will be empty.
Example usage:
StreamingCallable<String> streamingCallable = // ..
List<String> theResult = streamingCallable.all().call(request);
ApiFuture<List<String>> theResult = streamingCallable.all().futureCall(request);
all in class ServerStreamingCallable<RequestT,ResponseT>UnaryCallable.