Interface SpannerRpc.ResultStreamConsumer

Enclosing interface:
SpannerRpc

public static interface SpannerRpc.ResultStreamConsumer
Consumer for the results produced by a streaming read or query call.
  • Method Details

    • onPartialResultSet

      void onPartialResultSet(PartialResultSet results)
    • onCompleted

      void onCompleted()
    • onError

      void onError(SpannerException e)
    • cancelQueryWhenClientIsClosed

      boolean cancelQueryWhenClientIsClosed()
      Returns true if the stream should be cancelled when the Spanner client is closed. This returns true for BatchReadOnlyTransaction, as these use a non-pooled session. Pooled sessions are deleted when the Spanner client is closed, and this automatically also cancels any query that uses the session, which means that we don't need to explicitly cancel those queries when the Spanner client is closed.