ResponseQueueReader (Cloud Bigtable HBase Client for Java 0.9.3-SNAPSHOT API)

com.google.cloud.bigtable.grpc.scanner

Class ResponseQueueReader

  • All Implemented Interfaces:
    io.grpc.stub.StreamObserver<Row>


    public class ResponseQueueReader
    extends Object
    implements io.grpc.stub.StreamObserver<Row>
    Helper to read a queue of ResultQueueEntries and use the RowMergers to reconstruct complete Row objects from the partial ReadRowsResponse objects.
    Version:
    $Id: $Id
    Author:
    sduskis
    • Field Detail

      • resultQueue

        protected final BlockingQueue<com.google.cloud.bigtable.grpc.scanner.ResultQueueEntry<Row>> resultQueue
      • completionMarkerFound

        protected AtomicBoolean completionMarkerFound
    • Constructor Detail

      • ResponseQueueReader

        public ResponseQueueReader(int readPartialRowTimeoutMillis,
                                   int capacityCap)

        Constructor for ResponseQueueReader.

        Parameters:
        readPartialRowTimeoutMillis - a int.
        capacityCap - a int.
    • Method Detail

      • getNextMergedRow

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

        protected com.google.cloud.bigtable.grpc.scanner.ResultQueueEntry<Row> getNext()
                                                                                throws IOException

        getNext.

        Returns:
        a ResultQueueEntry object.
        Throws:
        IOException - if any.
      • available

        public int available()

        available.

        Returns:
        a int.
      • onNext

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

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

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


Send feedback about...

Cloud Bigtable Documentation