Class AbstractCollector<T,R>
- java.lang.Object
-
- com.oracle.coherence.concurrent.executor.AbstractCollector<T,R>
-
- Type Parameters:
T- the type of input elements to the reduction operationR- the result type of the reduction operation
- All Implemented Interfaces:
Task.Collector<T,List<T>,R>,com.tangosol.io.ExternalizableLite,com.tangosol.io.pof.PortableObject,Serializable
- Direct Known Subclasses:
TaskCollectors.CountCollector,TaskCollectors.LastOfCollector
public abstract class AbstractCollector<T,R> extends Object implements Task.Collector<T,List<T>,R>, com.tangosol.io.pof.PortableObject
An abstractTask.Collector.- Since:
- 21.12
- Author:
- bo
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BiConsumer<List<T>,T>accumulator()A function that foldsTaskresults into a mutable result container.com.tangosol.util.function.Remote.Predicate<List<T>>finishable()ARemote.Predicateto determine if a result container can be finished early avoiding further accumulation of results using the container.Supplier<List<T>>supplier()A function that creates and returns a new mutable result container.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.oracle.coherence.concurrent.executor.Task.Collector
finisher
-
-
-
-
Method Detail
-
accumulator
public BiConsumer<List<T>,T> accumulator()
Description copied from interface:Task.CollectorA function that foldsTaskresults into a mutable result container.- Specified by:
accumulatorin interfaceTask.Collector<T,List<T>,R>- Returns:
- a function that folds
Taskresults into a mutable result container
-
finishable
public com.tangosol.util.function.Remote.Predicate<List<T>> finishable()
Description copied from interface:Task.CollectorARemote.Predicateto 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
Task.Collector.finisher()will occur regardless of the result returned by theRemote.Predicate.- Specified by:
finishablein interfaceTask.Collector<T,List<T>,R>- Returns:
- a
Remote.Predicate
-
supplier
public Supplier<List<T>> supplier()
Description copied from interface:Task.CollectorA function that creates and returns a new mutable result container.
-
-