Callback invoked with the buffered batch when a flush occurs.
final void Function(List<T> batch) onFlush;