T - the type of input elements to the reduction operationA - the mutable accumulation type of the reduction operation (often
hidden as an implementation detail)R - the result type of the reduction operationpublic interface DistributedCollector<T,A,R> extends java.util.stream.Collector<T,A,R>, Serializable
Collector,
DistributedCollectors| Modifier and Type | Interface and Description |
|---|---|
static interface |
DistributedCollector.Reducer<T,R>
Interface for Jet specific distributed reducers which execute
the terminal reduce operation over the current
DistributedStream
by building and executing a DAG. |
java.util.stream.Collector.Characteristics| Modifier and Type | Method and Description |
|---|---|
Distributed.BiConsumer<A,T> |
accumulator()
A function that folds a value into a mutable result container.
|
Distributed.BinaryOperator<A> |
combiner()
A function that accepts two partial results and merges them.
|
Distributed.Function<A,R> |
finisher()
Perform the final transformation from the intermediate accumulation type
A to the final result type R. |
static <T,A,R> DistributedCollector<T,A,R> |
of(Distributed.Supplier<A> supplier,
Distributed.BiConsumer<A,T> accumulator,
Distributed.BinaryOperator<A> combiner,
Distributed.Function<A,R> finisher,
java.util.stream.Collector.Characteristics... characteristics)
Returns a new
Distributed.Collector described by the given supplier,
accumulator, combiner, and finisher functions. |
static <T,R> DistributedCollector<T,R,R> |
of(Distributed.Supplier<R> supplier,
Distributed.BiConsumer<R,T> accumulator,
Distributed.BinaryOperator<R> combiner,
java.util.stream.Collector.Characteristics... characteristics)
Returns a new
Distributed.Collector described by the given supplier,
accumulator, and combiner functions. |
Distributed.Supplier<A> |
supplier()
A function that creates and returns a new mutable result container.
|
characteristics, of, ofDistributed.Supplier<A> supplier()
supplier in interface java.util.stream.Collector<T,A,R>Distributed.BiConsumer<A,T> accumulator()
accumulator in interface java.util.stream.Collector<T,A,R>Distributed.BinaryOperator<A> combiner()
combiner in interface java.util.stream.Collector<T,A,R>Distributed.Function<A,R> finisher()
A to the final result type R.
If the characteristic IDENTITY_TRANSFORM is
set, this function may be presumed to be an identity transform with an
unchecked cast from A to R.
finisher in interface java.util.stream.Collector<T,A,R>static <T,R> DistributedCollector<T,R,R> of(Distributed.Supplier<R> supplier, Distributed.BiConsumer<R,T> accumulator, Distributed.BinaryOperator<R> combiner, java.util.stream.Collector.Characteristics... characteristics)
Distributed.Collector described by the given supplier,
accumulator, and combiner functions. The resulting
Distributed.Collector has the Collector.Characteristics.IDENTITY_FINISH
characteristic.T - The type of input elements for the new collectorR - The type of intermediate accumulation result, and final result,
for the new collectorsupplier - The supplier function for the new collectoraccumulator - The accumulator function for the new collectorcombiner - The combiner function for the new collectorcharacteristics - The collector characteristics for the new
collectorDistributed.CollectorNullPointerException - if any argument is nullstatic <T,A,R> DistributedCollector<T,A,R> of(Distributed.Supplier<A> supplier, Distributed.BiConsumer<A,T> accumulator, Distributed.BinaryOperator<A> combiner, Distributed.Function<A,R> finisher, java.util.stream.Collector.Characteristics... characteristics)
Distributed.Collector described by the given supplier,
accumulator, combiner, and finisher functions.T - The type of input elements for the new collectorA - The intermediate accumulation type of the new collectorR - The final result type of the new collectorsupplier - The supplier function for the new collectoraccumulator - The accumulator function for the new collectorcombiner - The combiner function for the new collectorfinisher - The finisher function for the new collectorcharacteristics - The collector characteristics for the new
collectorDistributed.CollectorNullPointerException - if any argument is nullCopyright © 2017 Hazelcast, Inc.. All Rights Reserved.