Interface Task.Collector<T,A,R>
-
- Type Parameters:
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 operation
- All Superinterfaces:
ExternalizableLite
,Serializable
- All Known Implementing Classes:
com.oracle.coherence.concurrent.executor.AbstractCollector
,TaskCollectors.CountCollector
,TaskCollectors.FirstOfCollector
,TaskCollectors.LastOfCollector
,TaskCollectors.ListOfCollector
,TaskCollectors.SetOfCollector
public static interface Task.Collector<T,A,R> extends ExternalizableLite
A mutable reduction operation that accumulates results into a mutable result container, optionally transforming the accumulated result into a final representation after all results have been processed.- See Also:
Collector
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BiConsumer<A,T>
accumulator()
A function that foldsTask
results into a mutable result container.Remote.Predicate<A>
finishable()
ARemote.Predicate
to determine if a result container can be finished early avoiding further accumulation of results using the container.Function<A,R>
finisher()
Perform the final transformation from the intermediate accumulation type A to the final result type R.Supplier<A>
supplier()
A function that creates and returns a new mutable result container.-
Methods inherited from interface com.tangosol.io.ExternalizableLite
readExternal, writeExternal
-
-
-
-
Method Detail
-
accumulator
BiConsumer<A,T> accumulator()
A function that foldsTask
results into a mutable result container.- Returns:
- a function that folds
Task
results into a mutable result container
-
finisher
Function<A,R> finisher()
Perform the final transformation from the intermediate accumulation type A to the final result type R.- Returns:
- a function which transforms the intermediate result to the final result
-
finishable
Remote.Predicate<A> finishable()
ARemote.Predicate
to determine if a result container can be finished early avoiding further accumulation of results using the container.Should there be no further results to accumulate, finishing the result container with the
finisher()
will occur regardless of the result returned by theRemote.Predicate
.- Returns:
- a
Remote.Predicate
-
-