Interface SpannerRpc.StreamingCall

  • Enclosing interface:
    SpannerRpc

    public static interface SpannerRpc.StreamingCall
    Handle for cancellation of a streaming read or query call.
    • Method Detail

      • 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

        void cancel​(@Nullable
                    String message)
        Cancels the call.
        Parameters:
        message - a message to use in the final status of any underlying RPC