@Override
  public synchronized void onHeartbeat(ScanController controller) {
    if (closed) {
      controller.terminate();
      return;
    }
    if (scan.isNeedCursorResult()) {
      controller.cursor().ifPresent(c -> queue.add(Result.createCursorResult(c)));
    }
  }
The {@link ResultScanner} implementation for {@link RawAsyncTableImpl}. It will fetch data
automatically in background and cache it in memory. Typically, the {@link #maxCacheSize} will be
{@code 2 * scan.getMaxResultSize()}.
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncTableResultScanner.java