code: public boolean isAtEnd() {
      final AtomicBoolean atEnd = new AtomicBoolean(true);
      foreachPartition(ps -> {
        if (!ps.isAtEnd()) {
          atEnd.set(false);
        }
      });
      return atEnd.get();
    }
docs: Check if the current sequence numbers for all partitions are >= the ones set as end.
  
  @return true if all are at the end, false otherwise.