Aliran batch Java-8,

Iterators.partition(stream.iterator(), batchSize).forEachRemaining(this::process);
KP