Class BatchCollector<T>
- java.lang.Object
-
- org.alfresco.heartbeat.datasender.internal.stream.BatchCollector<T>
-
- Type Parameters:
T- Type of the elements being collected
public class BatchCollector<T> extends Object implements Collector<T,List<T>,List<T>>
Collects elements in the stream and calls the supplied batch processor after the configured batch size is reached. In case of a parallel stream, the batch processor may be called with elements less than the batch size. The final result is an empty list.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface java.util.stream.Collector
Collector.Characteristics
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BiConsumer<List<T>,T>accumulator()Set<Collector.Characteristics>characteristics()BinaryOperator<List<T>>combiner()Function<List<T>,List<T>>finisher()Supplier<List<T>>supplier()
-