public static interface AsyncResultSet.StreamMessageListenerAn internal notification listener for a streaming gRPC request.
This listener is purely a notification mechanism to signal that messages or stream events are buffered in the underlying stream iterator. It is not a data consumer and does not process or reconstruct rows. All query results and data chunks must be consumed sequentially via the iterator's FIFO queue (e.g. ResultSet#next()).
Methods
onStreamMessage(PartialResultSet partialResultSet, boolean bufferIsFull)
public abstract void onStreamMessage(PartialResultSet partialResultSet, boolean bufferIsFull)Invoked to notify that a message or stream event has arrived in the stream's buffer.
Implementations of this method must be thread-safe, idempotent, and order-agnostic. Because notifications may be dispatched concurrently by gRPC network threads and iterator initialization/flushing threads:
- Notifications may arrive concurrently from multiple threads.
- The same
partialResultSetmay be delivered more than once. - Notifications for different chunks may arrive out of order.
Implementations must tolerate out-of-order and duplicate notifications without adverse side effects, and must not assume that this method delivers chunks sequentially for data processing.
| Parameters | |
|---|---|
| Name | Description |
partialResultSet |
PartialResultSetthe chunk received from the stream, or an empty sentinel PartialResultSet if the stream has completed |
bufferIsFull |
booleanwhether the stream iterator's internal buffer capacity is currently full |