Interface SpannerRpc.ResultStreamConsumer (6.77.0)

public static interface SpannerRpc.ResultStreamConsumer

Consumer for the results produced by a streaming read or query call.

Methods

cancelQueryWhenClientIsClosed()

public abstract boolean cancelQueryWhenClientIsClosed()

Returns true if the stream should be cancelled when the Spanner client is closed. This returns true for com.google.cloud.spanner.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.

Returns
Type Description
boolean

onCompleted()

public abstract void onCompleted()

onError(SpannerException e)

public abstract void onError(SpannerException e)
Parameter
Name Description
e SpannerException

onPartialResultSet(PartialResultSet results)

public abstract void onPartialResultSet(PartialResultSet results)
Parameter
Name Description
results PartialResultSet