Class PartitionHandle

java.lang.Object
com.couchbase.analytics.client.java.PartitionHandle
All Implemented Interfaces:
RowSource

@Experimental @ThreadSafe public class PartitionHandle extends Object
  • Method Details

    • rowCount

      public long rowCount()
      Description copied from interface: RowSource
      Returns the number of result rows.
      Specified by:
      rowCount in interface RowSource
    • streamRows

      public QueryMetadata streamRows(Consumer<Row> rowAction, Consumer<RowOptions> options)
      Description copied from interface: RowSource
      Fetches result rows and passes them to the given rowAction callback, one by one as they arrive from the server.

      The callback action is guaranteed to execute in the same thread (or virtual thread) that called this method. If the callback throws an exception, the exception is re-thrown by this method.

      Prefer this over RowSource.bufferRows() when it's unknown whether the rows fit in memory.

      Specified by:
      streamRows in interface RowSource
      Parameters:
      options - A callback for specifying custom options.