Class ParallelAggregators

java.lang.Object
org.aksw.commons.collector.core.ParallelAggregators

public class ParallelAggregators extends Object
  • Constructor Details

    • ParallelAggregators

      public ParallelAggregators()
  • Method Details

    • combineAccumulators

      public static <T, E, V, C extends Collection<V>> Accumulator<T,E,C> combineAccumulators(Accumulator<T,E,C> needle, Accumulator<T,E,C> haystack, UnaryOperator<Accumulator<T,E,C>> accumulatorCloner, Function<? super V, ? extends T> valueToItem, E env)
      Merge two accumulators.
      Type Parameters:
      T -
      C -
      Parameters:
      needle -
      haystack -
      accumulatorCloner - The cloner; may return its argument for in place changes.
      Returns:
    • createCollector

      public static <I, E, O, ACC extends Accumulator<I,E,O>> Collector<I,?,O> createCollector(ParallelAggregator<I,E,O,ACC> agg, E env)
      Create a serializable java8 collector from a parallel aggregator.