Class TaskCollectors
java.lang.Object
com.oracle.coherence.concurrent.executor.TaskCollectors
Static helper methods to create
Task.Collectors.- Since:
- 21.06
- Author:
- bo
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classATask.Collectorthat counts the number of results are present.static classATask.Collectorto collect any (the first provided) available result.static classATask.Collectorthat collects and returns the last contributed result.static classATask.Collectorthat collects and returns all contributed results that are values as aList.static classATask.Collectorthat collects and returns all contributed results that are values as aSet. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Task.Collector<? super T, ?, Integer> count()ATask.Collectorthat counts the number of non-null results that have been made.static <T> Task.Collector<T, ?, T> firstOf()ATask.Collectorthat will collect the first provided result.static <T> Task.Collector<T, ?, T> lastOf()ATask.Collectorthat returns the last added result, when all results have been provided.static <T> Task.Collector<T, ?, List<T>> listOf()ATask.Collectorthat returns theListof results that are values.static <T> Task.Collector<T, ?, Set<T>> setOf()ATask.Collectorthat returns theSetof results that are values.
-
Method Details
-
listOf
ATask.Collectorthat returns theListof results that are values.- Type Parameters:
T- the type of the result- Returns:
- a
Task.Collector
-
setOf
ATask.Collectorthat returns theSetof results that are values.- Type Parameters:
T- the type of the result- Returns:
- a
Task.Collector
-
lastOf
ATask.Collectorthat returns the last added result, when all results have been provided.- Type Parameters:
T- the type of the result- Returns:
- a
Task.Collector
-
count
ATask.Collectorthat counts the number of non-null results that have been made.- Type Parameters:
T- the type of result- Returns:
- a
Task.Collector
-
firstOf
ATask.Collectorthat will collect the first provided result.- Type Parameters:
T- the type of result- Returns:
- a
Task.Collector
-