Package com.google.cloud.spanner.spi.v1
Interface SpannerRpc.StreamingCall
- Enclosing interface:
- SpannerRpc
public static interface SpannerRpc.StreamingCall
Handle for cancellation of a streaming read or query call.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Cancels the call.com.google.api.gax.rpc.ApiCallContext
Returns theApiCallContext
that is used for this streaming call.void
request
(int numMessages) Requests more messages from the stream.
-
Method Details
-
getCallContext
com.google.api.gax.rpc.ApiCallContext getCallContext()Returns theApiCallContext
that is used for this streaming call. -
request
void request(int numMessages) Requests more messages from the stream. We disable the auto flow control mechanism in grpc, so we need to request messages ourself. This gives us more control over how much buffer we maintain in the client. Grpc will request 1 initial message automatically so we don't need to call this at the beginning. After that it should be called whenever there is a flow control window available based on the flow control setting configured by the client. Currently we do not have any flow control so this is called automatically when a message is received. -
cancel
Cancels the call.- Parameters:
message
- a message to use in the final status of any underlying RPC
-