Class TaskCollectors.SetOfCollector<T>
- java.lang.Object
-
- com.oracle.coherence.concurrent.executor.TaskCollectors.SetOfCollector<T>
-
- Type Parameters:
T- the type of the result
- All Implemented Interfaces:
Task.Collector<T,Set<T>,Set<T>>,com.tangosol.io.ExternalizableLite,com.tangosol.io.pof.PortableObject,Serializable
- Enclosing class:
- TaskCollectors
public static class TaskCollectors.SetOfCollector<T> extends Object implements Task.Collector<T,Set<T>,Set<T>>, com.tangosol.io.pof.PortableObject
ATask.Collectorthat collects and returns all contributed results that are values as aSet.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SetOfCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BiConsumer<Set<T>,T>accumulator()A function that foldsTaskresults into a mutable result container.com.tangosol.util.function.Remote.Predicate<Set<T>>finishable()ARemote.Predicateto determine if a result container can be finished early avoiding further accumulation of results using the container.Function<Set<T>,Set<T>>finisher()Perform the final transformation from the intermediate accumulation type A to the final result type R.voidreadExternal(com.tangosol.io.pof.PofReader in)voidreadExternal(DataInput in)Supplier<Set<T>>supplier()A function that creates and returns a new mutable result container.voidwriteExternal(com.tangosol.io.pof.PofWriter out)voidwriteExternal(DataOutput out)
-
-
-
Method Detail
-
accumulator
public BiConsumer<Set<T>,T> accumulator()
Description copied from interface:Task.CollectorA function that foldsTaskresults into a mutable result container.- Specified by:
accumulatorin interfaceTask.Collector<T,Set<T>,Set<T>>- Returns:
- a function that folds
Taskresults into a mutable result container
-
finisher
public Function<Set<T>,Set<T>> finisher()
Description copied from interface:Task.CollectorPerform the final transformation from the intermediate accumulation type A to the final result type R.
-
finishable
public com.tangosol.util.function.Remote.Predicate<Set<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,Set<T>,Set<T>>- Returns:
- a
Remote.Predicate
-
supplier
public Supplier<Set<T>> supplier()
Description copied from interface:Task.CollectorA function that creates and returns a new mutable result container.
-
readExternal
public void readExternal(DataInput in) throws IOException
- Specified by:
readExternalin interfacecom.tangosol.io.ExternalizableLite- Throws:
IOException
-
writeExternal
public void writeExternal(DataOutput out) throws IOException
- Specified by:
writeExternalin interfacecom.tangosol.io.ExternalizableLite- Throws:
IOException
-
readExternal
public void readExternal(com.tangosol.io.pof.PofReader in) throws IOException- Specified by:
readExternalin interfacecom.tangosol.io.pof.PortableObject- Throws:
IOException
-
writeExternal
public void writeExternal(com.tangosol.io.pof.PofWriter out) throws IOException- Specified by:
writeExternalin interfacecom.tangosol.io.pof.PortableObject- Throws:
IOException
-
-