ResponseQueueReader (Cloud Bigtable HBase Client for Java 1.12.0 API)

Class ResponseQueueReader

  • All Implemented Interfaces:
    io.grpc.stub.ClientResponseObserver<,FlatRow>, io.grpc.stub.StreamObserver<FlatRow>

    public class ResponseQueueReader
    extends Object
    implements io.grpc.stub.StreamObserver<FlatRow>, io.grpc.stub.ClientResponseObserver<,FlatRow>
    Manages a queue of ResultQueueEntrys of FlatRow.
    $Id: $Id
    See Also:
    for more information.
    • Constructor Detail

      • ResponseQueueReader

        public ResponseQueueReader()
        Constructor for ResponseQueueReader.
    • Method Detail

      • beforeStart

        public void beforeStart(io.grpc.stub.ClientCallStreamObserver<> requestStream)
        Specified by:
        beforeStart in interface io.grpc.stub.ClientResponseObserver<,FlatRow>
      • close

        public void close()
      • getNextMergedRow

        public FlatRow getNextMergedRow()
                                 throws IOException
        Get the next complete FlatRow object from the response queue.
        null if end-of-stream, otherwise a complete FlatRow.
        IOException - On errors.
      • getNext

        protected<FlatRow> getNext()
                                                                                    throws IOException
        a ResultQueueEntry object.
        IOException - if any.
      • available

        public int available()
        a int.
      • onNext

        public void onNext(FlatRow row)
        Specified by:
        onNext in interface io.grpc.stub.StreamObserver<FlatRow>
      • onError

        public void onError(Throwable t)
        Specified by:
        onError in interface io.grpc.stub.StreamObserver<FlatRow>
      • onCompleted

        public void onCompleted()
        Specified by:
        onCompleted in interface io.grpc.stub.StreamObserver<FlatRow>
      • addRequestResultMarker

        public void addRequestResultMarker()
        This marker notifies getNextMergedRow() to request more results and allows for flow control based on the state of the resultQueue. If rows are removed from the queue quickly, getNextMergedRow() will request more results. If rows are not read fast enough, then gRPC will stop fetching rows, and will wait until more rows are requested. This marker tells getNextMergedRow() to read more rows.

Czy ta strona była pomocna? Podziel się z nami swoją opinią:

Wyślij opinię na temat...

Cloud Bigtable Documentation