code: private synchronized TableBucket getNextBucketFromExistingBatch() {
          if (this.currentBatch != null) {
              TableBucket next = this.currentBatch.next();
              if (!this.currentBatch.hasNext()) {
                  this.currentBatch = null;
              }
  
              return next;
          }
  
          return null;
      }
docs: Gets the next {@link TableBucket} in the iteration from the cached batch. If the batch is exhausted, returns null.