public abstract class DistributedCollectors extends Object
Serializable variants of java.util.stream.Collectors.| Constructor and Description |
|---|
DistributedCollectors() |
public static <T,C extends Collection<T>> DistributedCollector<T,?,C> toCollection(DistributedSupplier<C> collectionSupplier)
Serializable variant of java.util.stream.Collectors#toCollection(Supplier)public static <T> DistributedCollector<T,?,List<T>> toList()
Serializable variant of java.util.stream.Collectors#toList()public static <T> DistributedCollector<T,?,Set<T>> toSet()
Serializable variant of java.util.stream.Collectors#toSet()public static DistributedCollector<CharSequence,?,String> joining()
Serializable variant of java.util.stream.Collectors#joining()public static DistributedCollector<CharSequence,?,String> joining(CharSequence delimiter)
Serializable variant of java.util.stream.Collectors#joining(CharSequence)public static DistributedCollector<CharSequence,?,String> joining(CharSequence delimiter, CharSequence prefix, CharSequence suffix)
Serializable variant of java.util.stream.Collectors#joining(CharSequence, CharSequence, CharSequence)public static <T,U,A,R> DistributedCollector<T,?,R> mapping(DistributedFunction<? super T,? extends U> mapper, DistributedCollector<? super U,A,R> downstream)
Serializable variant of java.util.stream.Collectors#mapping(Function, Collector)public static <T,A,I,R> DistributedCollector<T,A,R> collectingAndThen(DistributedCollector<T,A,I> downstream, DistributedFunction<I,R> finisher)
Serializable variant of {@link
Collectors#collectingAndThen(Collector, Function)
java.util.stream.Collectors#collectingAndThen(Collector, Function)public static <T> DistributedCollector<T,?,Long> counting()
Serializable variant of java.util.stream.Collectors#counting()public static <T> DistributedCollector<T,?,Optional<T>> minBy(DistributedComparator<? super T> comparator)
Serializable variant of java.util.stream.Collectors#minBy(Comparator)public static <T> DistributedCollector<T,?,Optional<T>> maxBy(DistributedComparator<? super T> comparator)
Serializable variant of java.util.stream.Collectors#maxBy(Comparator)public static <T> DistributedCollector<T,?,Integer> summingInt(DistributedToIntFunction<? super T> mapper)
Serializable variant of java.util.stream.Collectors#summingInt(ToIntFunction)public static <T> DistributedCollector<T,?,Long> summingLong(DistributedToLongFunction<? super T> mapper)
Serializable variant of java.util.stream.Collectors#summingLong(ToLongFunction)public static <T> DistributedCollector<T,?,Double> summingDouble(DistributedToDoubleFunction<? super T> mapper)
Serializable variant of java.util.stream.Collectors#summingDouble(ToDoubleFunction)public static <T> DistributedCollector<T,?,Double> averagingInt(DistributedToIntFunction<? super T> mapper)
Serializable variant of java.util.stream.Collectors#averagingInt(ToIntFunction)public static <T> DistributedCollector<T,?,Double> averagingLong(DistributedToLongFunction<? super T> mapper)
Serializable variant of java.util.stream.Collectors#averagingLong(ToLongFunction)public static <T> DistributedCollector<T,?,Double> averagingDouble(DistributedToDoubleFunction<? super T> mapper)
Serializable variant of java.util.stream.Collectors#averagingDouble(ToDoubleFunction)public static <T> DistributedCollector<T,?,T> reducing(T identity, DistributedBinaryOperator<T> op)
Serializable variant of Collectors.reducing(Object, BinaryOperator)
java.util.stream.Collectors#reducing(Object, BinaryOperator)}public static <T> DistributedCollector<T,?,Optional<T>> reducing(DistributedBinaryOperator<T> op)
Serializable variant of java.util.stream.Collectors#reducing(BinaryOperator)public static <T,U> DistributedCollector<T,?,U> reducing(U identity, DistributedFunction<? super T,? extends U> mapper, DistributedBinaryOperator<U> op)
Serializable variant of java.util.stream.Collectors#reducing(Object, Function, BinaryOperator)public static <T,K> DistributedCollector<T,?,Map<K,List<T>>> groupingBy(DistributedFunction<? super T,? extends K> classifier)
Serializable variant of java.util.stream.Collectors#groupingBy(Function)public static <T,K,A,D> DistributedCollector<T,?,Map<K,D>> groupingBy(DistributedFunction<? super T,? extends K> classifier, DistributedCollector<? super T,A,D> downstream)
Serializable variant of java.util.stream.Collectors#groupingBy(Function, Collector)public static <T,K,R,A,M extends Map<K,R>> DistributedCollector<T,?,M> groupingBy(DistributedFunction<? super T,? extends K> classifier, DistributedSupplier<M> mapFactory, DistributedCollector<? super T,A,R> downstream)
Serializable variant of java.util.stream.Collectors#groupingBy(Function, Supplier, Collector)public static <T> Collector<T,?,Map<Boolean,List<T>>> partitioningBy(DistributedPredicate<? super T> predicate)
Serializable variant of java.util.stream.Collectors#partitioningBy(Predicate)public static <T,D,A> Collector<T,?,Map<Boolean,D>> partitioningBy(DistributedPredicate<? super T> predicate, DistributedCollector<? super T,A,D> downstream)
Serializable variant of java.util.stream.Collectors#partitioningBy(Predicate, Collector)public static <T,K,U> DistributedCollector<T,?,Map<K,U>> toMap(DistributedFunction<? super T,? extends K> keyMapper, DistributedFunction<? super T,? extends U> valueMapper)
Serializable variant of java.util.stream.Collectors#toMap(Function, Function)public static <T,K,U> Collector<T,?,Map<K,U>> toMap(DistributedFunction<? super T,? extends K> keyMapper, DistributedFunction<? super T,? extends U> valueMapper, DistributedBinaryOperator<U> mergeFunction)
Serializable variant of java.util.stream.Collectors#toMap(Function, Function, BinaryOperator)public static <T,K,U,M extends Map<K,U>> DistributedCollector<T,?,M> toMap(DistributedFunction<? super T,? extends K> keyMapper, DistributedFunction<? super T,? extends U> valueMapper, DistributedBinaryOperator<U> mergeFunction, DistributedSupplier<M> mapSupplier)
Serializable variant of java.util.stream.Collectors#toMap(Function, Function, BinaryOperator, Supplier)public static <T> DistributedCollector<T,?,IntSummaryStatistics> summarizingInt(DistributedToIntFunction<? super T> mapper)
Serializable variant of java.util.stream.Collectors#summarizingInt(ToIntFunction)public static <T> DistributedCollector<T,?,LongSummaryStatistics> summarizingLong(DistributedToLongFunction<? super T> mapper)
Serializable variant of java.util.stream.Collectors#summarizingLong(ToLongFunction)public static <T> DistributedCollector<T,?,DoubleSummaryStatistics> summarizingDouble(DistributedToDoubleFunction<? super T> mapper)
Serializable variant of java.util.stream.Collectors#summarizingDouble(ToDoubleFunction)public static <T,A,R> DistributedCollector<T,A,R> aggregating(AggregateOperation1<T,A,R> aggregateOp)
AggregateOperation1.public static <T,K,U> DistributedCollector.Reducer<T,IMapJet<K,U>> toIMap(String mapName, DistributedFunction<? super T,? extends K> keyMapper, DistributedFunction<? super T,? extends U> valueMapper)
java.util.stream.Collectors#toMap(Function,Function) which, instead of
creating a regular Java map, writes the results to the distributed
IMapJet with the given name. The stream expression will return the
IMapJet in question.public static <K,U> DistributedCollector.Reducer<Map.Entry<K,U>,IMapJet<K,U>> toIMap(String mapName)
java.util.stream.Collectors#toMap(Function,Function) which, instead of
returning a map as the result, writes the results to the distributed
IMapJet with the given name.
This collector expects to receive Map.Entrys and it will put them
as key/value pairs to the target map.
public static <T,K,U> DistributedCollector.Reducer<T,IMapJet<K,U>> toIMap(String mapName, DistributedFunction<? super T,? extends K> keyMapper, DistributedFunction<? super T,? extends U> valueMapper, DistributedBinaryOperator<U> mergeFunction)
java.util.stream.Collectors#toMap(Function, Function, BinaryOperator)
which, instead of returning a map as the result, writes the results
to the distributed IMapJet with the given name.public static <T,K,U> DistributedCollector.Reducer<T,ICacheJet<K,U>> toICache(String cacheName, DistributedFunction<? super T,? extends K> keyMapper, DistributedFunction<? super T,? extends U> valueMapper)
java.util.stream.Collectors#toMap(Function, Function) which, instead of
returning a map as the result, writes the results to the distributed
ICacheJet with the given name.public static <K,U> DistributedCollector.Reducer<Map.Entry<K,U>,ICacheJet<K,U>> toICache(String cacheName)
java.util.stream.Collectors#toMap(Function, Function) which, instead of
returning a map as the result, writes the results to the distributed
ICacheJet with the given name.public static <T,K,U> DistributedCollector.Reducer<T,ICacheJet<K,U>> toICache(String cacheName, DistributedFunction<? super T,? extends K> keyMapper, DistributedFunction<? super T,? extends U> valueMapper, DistributedBinaryOperator<U> mergeFunction)
java.util.stream.Collectors#toMap(Function, Function) which, instead of
returning a map as the result, writes the results to the distributed
ICacheJet with the given name.public static <T> DistributedCollector.Reducer<T,IListJet<T>> toIList(String listName)
java.util.stream.Collectors#toList()
which, instead of returning a list as the result, writes the results to the
distributed IListJet with the given name.public static <T,K> DistributedCollector.Reducer<T,IMapJet<K,List<T>>> groupingByToIMap(String mapName, DistributedFunction<? super T,? extends K> classifier)
java.util.stream.Collectors#groupingBy(Function) which, instead of
returning a map as the result, writes the grouped results to the
distributed IMapJet with the given name.public static <T,K,A,D> DistributedCollector.Reducer<T,IMapJet<K,D>> groupingByToIMap(String mapName, DistributedFunction<? super T,? extends K> classifier, DistributedCollector<? super T,A,D> downstream)
java.util.stream.Collectors#groupingBy(Function, Collector) which,
instead of returning a map as the result, writes the grouped results to
the distributed IMapJet with the given name. The downstream
collector you provide will produce the value to be stored under each
grouping key. The value must be serializable.public static <T,K> DistributedCollector.Reducer<T,ICacheJet<K,List<T>>> groupingByToICache(String cacheName, DistributedFunction<? super T,? extends K> classifier)
java.util.stream.Collectors#groupingBy(Function, Collector) which, instead of
returning a map as the result, writes the grouped results to the distributed
ICacheJet with the given name.public static <T,K,A,D> DistributedCollector.Reducer<T,ICacheJet<K,D>> groupingByToICache(String cacheName, DistributedFunction<? super T,? extends K> classifier, DistributedCollector<? super T,A,D> downstream)
java.util.stream.Collectors#groupingBy(Function, Collector) which,
instead of returning a map as the result, writes the grouped results to
the distributed ICacheJet with the given name. The downstream
collector you provide will produce the value to be stored under each
grouping key. The value must be serializable.Copyright © 2018 Hazelcast, Inc.. All rights reserved.