Uses of Interface
com.tangosol.util.stream.RemoteCollector
Package
Description
Contains classes to enable Repository-like access to Coherence data.
Contains classes to support functional-style operations on remote streams of elements,
such as map-reduce transformations on collections.
-
Uses of RemoteCollector in com.oracle.coherence.repository
Modifier and TypeMethodDescription<K,
A, R, M extends Map<K, R>>
CompletableFuture<M> AbstractAsyncRepository.groupBy
(Filter<?> filter, ValueExtractor<? super T, ? extends K> extractor, Remote.Supplier<M> mapFactory, RemoteCollector<? super T, A, R> collector) Return the grouping of entities by the specified extractor.<K,
A, R> CompletableFuture <Map<K, R>> AbstractAsyncRepository.groupBy
(Filter<?> filter, ValueExtractor<? super T, ? extends K> extractor, RemoteCollector<? super T, A, R> collector) Return the grouping of entities by the specified extractor.<K,
A, R, M extends Map<K, R>>
CompletableFuture<M> AbstractAsyncRepository.groupBy
(ValueExtractor<? super T, ? extends K> extractor, Remote.Supplier<M> mapFactory, RemoteCollector<? super T, A, R> collector) Return the grouping of entities by the specified extractor.<K,
A, R> CompletableFuture <Map<K, R>> AbstractAsyncRepository.groupBy
(ValueExtractor<? super T, ? extends K> extractor, RemoteCollector<? super T, A, R> collector) Return the grouping of entities by the specified extractor.<K,
A, R, M extends Map<K, R>>
MAbstractRepository.groupBy
(Filter<?> filter, ValueExtractor<? super T, ? extends K> extractor, Remote.Supplier<M> mapFactory, RemoteCollector<? super T, A, R> collector) Return the grouping of entities by the specified extractor.<K,
A, R> Map <K, R> AbstractRepository.groupBy
(Filter<?> filter, ValueExtractor<? super T, ? extends K> extractor, RemoteCollector<? super T, A, R> collector) Return the grouping of entities by the specified extractor.<K,
A, R, M extends Map<K, R>>
MAbstractRepository.groupBy
(ValueExtractor<? super T, ? extends K> extractor, Remote.Supplier<M> mapFactory, RemoteCollector<? super T, A, R> collector) Return the grouping of entities by the specified extractor.<K,
A, R> Map <K, R> AbstractRepository.groupBy
(ValueExtractor<? super T, ? extends K> extractor, RemoteCollector<? super T, A, R> collector) Return the grouping of entities by the specified extractor. -
Uses of RemoteCollector in com.tangosol.util.stream
Modifier and TypeMethodDescriptionstatic <T,
U> RemoteCollector <T, ?, Double> RemoteCollectors.averagingDouble
(ValueExtractor<? super U, ? extends Number> extractor) Returns aCollector
that produces the arithmetic mean of a double-valued function applied to the input elements.static <T,
U> RemoteCollector <T, ?, Double> RemoteCollectors.averagingInt
(ValueExtractor<? super U, ? extends Number> extractor) Returns aCollector
that produces the arithmetic mean of an integer-valued function applied to the input elements.static <T,
U> RemoteCollector <T, ?, Double> RemoteCollectors.averagingLong
(ValueExtractor<? super U, ? extends Number> extractor) Returns aCollector
that produces the arithmetic mean of a long-valued function applied to the input elements.static <T,
A, R, RR>
RemoteCollector<T, A, RR> RemoteCollectors.collectingAndThen
(RemoteCollector<T, A, R> downstream, Remote.Function<R, RR> finisher) Adapts aCollector
to perform an additional finishing transformation.static <T> RemoteCollector
<T, ?, Long> RemoteCollectors.counting()
Returns aCollector
accepting elements of typeT
that counts the number of input elements.static <T,
U, K> RemoteCollector <T, ?, Map<K, List<T>>> RemoteCollectors.groupingBy
(ValueExtractor<? super U, ? extends K> classifier) Returns aCollector
implementing a "group by" operation on input elements of typeT
, grouping elements according to a classification function, and returning the results in aMap
.static <T,
U, K, D, A, M extends Map<K, D>>
RemoteCollector<T, ?, M> RemoteCollectors.groupingBy
(ValueExtractor<? super U, ? extends K> extractor, Remote.Supplier<M> mapFactory, RemoteCollector<? super T, A, D> downstream) Returns aCollector
implementing a cascaded "group by" operation on input elements of typeT
, grouping elements according to a classification function, and then performing a reduction operation on the values associated with a given key using the specified downstreamCollector
.static <T,
U, K, A, D>
RemoteCollector<T, ?, Map<K, D>> RemoteCollectors.groupingBy
(ValueExtractor<? super U, ? extends K> classifier, RemoteCollector<? super T, A, D> downstream) Returns aCollector
implementing a cascaded "group by" operation on input elements of typeT
, grouping elements according to a classification function, and then performing a reduction operation on the values associated with a given key using the specified downstreamCollector
.static <T,
U, A, R>
RemoteCollector<T, A, R> RemoteCollectors.mapping
(Remote.Function<? super T, ? extends U> mapper, RemoteCollector<? super U, A, R> downstream) Adapts aCollector
accepting elements of typeU
to one accepting elements of typeT
by applying a mapping function to each input element before accumulation.static <T> RemoteCollector
<T, ?, Optional<T>> RemoteCollectors.maxBy
(Remote.Comparator<? super T> comparator) Returns aCollector
that produces the maximal element according to a givenComparator
, described as anOptional<T>
.static <T,
E extends Comparable<? super E>>
RemoteCollector<T, ?, Optional<T>> RemoteCollectors.maxBy
(ValueExtractor<? super T, ? extends E> comparable) Returns aCollector
that produces the maximal element according to a givenComparable
attribute, described as anOptional<T>
.static <T> RemoteCollector
<T, ?, Optional<T>> RemoteCollectors.minBy
(Remote.Comparator<? super T> comparator) Returns aCollector
that produces the minimal element according to a givenComparator
, described as anOptional<T>
.static <T,
E extends Comparable<? super E>>
RemoteCollector<T, ?, Optional<T>> RemoteCollectors.minBy
(ValueExtractor<? super T, ? extends E> comparable) Returns aCollector
that produces the minimal element according to a givenComparable
attribute, described as anOptional<T>
.static <T,
A, R> RemoteCollector <T, A, R> RemoteCollector.of
(Remote.Supplier<A> supplier, Remote.BiConsumer<A, T> accumulator, Remote.BinaryOperator<A> combiner, Remote.Function<A, R> finisher, Collector.Characteristics... characteristics) Returns a newCollector
described by the givensupplier
,accumulator
,combiner
, andfinisher
functions.static <T,
R> RemoteCollector <T, R, R> RemoteCollector.of
(Remote.Supplier<R> supplier, Remote.BiConsumer<R, T> accumulator, Remote.BinaryOperator<R> combiner, Collector.Characteristics... characteristics) Returns a newCollector
described by the givensupplier
,accumulator
, andcombiner
functions.static <T,
A, R> RemoteCollector <T, A, R> RemoteCollector.of
(Supplier<A> supplier, BiConsumer<A, T> accumulator, BinaryOperator<A> combiner, Function<A, R> finisher, Collector.Characteristics... characteristics) Returns a newCollector
described by the givensupplier
,accumulator
,combiner
, andfinisher
functions.static <T,
R> RemoteCollector <T, R, R> RemoteCollector.of
(Supplier<R> supplier, BiConsumer<R, T> accumulator, BinaryOperator<R> combiner, Collector.Characteristics... characteristics) Returns a newCollector
described by the givensupplier
,accumulator
, andcombiner
functions.static <T> RemoteCollector
<T, ?, Optional<T>> RemoteCollectors.reducing
(Remote.BinaryOperator<T> op) Returns aCollector
which performs a reduction of its input elements under a specifiedBinaryOperator
.static <T> RemoteCollector
<T, SimpleHolder<T>, T> RemoteCollectors.reducing
(T identity, Remote.BinaryOperator<T> op) Returns aCollector
which performs a reduction of its input elements under a specifiedBinaryOperator
using the provided identity.static <T,
U> RemoteCollector <T, ?, U> RemoteCollectors.reducing
(U identity, Remote.BiFunction<? super U, ? super T, ? extends U> mapper, Remote.BinaryOperator<U> op) Returns aCollector
which performs a reduction of its input elements under a specified mapping function andBinaryOperator
.static <T,
U> RemoteCollector <T, ?, U> RemoteCollectors.reducing
(U identity, Remote.Function<? super T, ? extends U> mapper, Remote.BinaryOperator<U> op) Returns aCollector
which performs a reduction of its input elements under a specified mapping function andBinaryOperator
.static <T,
U> RemoteCollector <T, ?, com.tangosol.internal.util.DoubleSummaryStatistics> RemoteCollectors.summarizingDouble
(ValueExtractor<? super U, ? extends Number> extractor) Returns aCollector
which applies andouble
-producing mapping function to each input element, and returns summary statistics for the resulting values.static <T,
U> RemoteCollector <T, ?, com.tangosol.internal.util.IntSummaryStatistics> RemoteCollectors.summarizingInt
(ValueExtractor<? super U, ? extends Number> extractor) Returns aCollector
which applies anint
-producing mapping function to each input element, and returns summary statistics for the resulting values.static <T,
U> RemoteCollector <T, ?, com.tangosol.internal.util.LongSummaryStatistics> RemoteCollectors.summarizingLong
(ValueExtractor<? super U, ? extends Number> extractor) Returns aCollector
which applies anlong
-producing mapping function to each input element, and returns summary statistics for the resulting values.static <T,
U> RemoteCollector <T, ?, Double> RemoteCollectors.summingDouble
(ValueExtractor<? super U, ? extends Number> extractor) Returns aCollector
that produces the sum of a double-valued function applied to the input elements.static <T,
U> RemoteCollector <T, ?, Integer> RemoteCollectors.summingInt
(ValueExtractor<? super U, ? extends Number> extractor) Returns aCollector
that produces the sum of a integer-valued function applied to the input elements.static <T,
U> RemoteCollector <T, ?, Long> RemoteCollectors.summingLong
(ValueExtractor<? super U, ? extends Number> extractor) Returns aCollector
that produces the sum of a long-valued function applied to the input elements.static <T,
C extends Collection<T>>
RemoteCollector<T, ?, C> RemoteCollectors.toCollection
(Remote.Supplier<C> supplier) Returns aCollector
that accumulates the input elements into a newCollection
, in encounter order.static <T,
U1, U2, K, V>
RemoteCollector<T, ?, ConcurrentMap<K, V>> RemoteCollectors.toConcurrentMap
(ValueExtractor<? super U1, ? extends K> keyMapper, ValueExtractor<? super U2, ? extends V> valueMapper) Returns a concurrentCollector
that accumulates elements into aConcurrentMap
whose keys and values are the result of applying the provided mapping functions to the input elements.static <T,
U1, U2, K, V>
RemoteCollector<T, ?, ConcurrentMap<K, V>> RemoteCollectors.toConcurrentMap
(ValueExtractor<? super U1, ? extends K> keyMapper, ValueExtractor<? super U2, ? extends V> valueMapper, Remote.BinaryOperator<V> mergeFunction) Returns a concurrentCollector
that accumulates elements into aConcurrentMap
whose keys and values are the result of applying the provided mapping functions to the input elements.static <T> RemoteCollector
<T, ?, List<T>> RemoteCollectors.toList()
Returns aCollector
that accumulates the input elements into a newList
.static <T,
U1, U2, K, V>
RemoteCollector<T, ?, Map<K, V>> RemoteCollectors.toMap
(ValueExtractor<? super U1, ? extends K> keyMapper, ValueExtractor<? super U2, ? extends V> valueMapper) Returns aCollector
that accumulates elements into aMap
whose keys and values are the result of applying the provided mapping functions to the input elements.static <T,
U1, U2, K, V>
RemoteCollector<T, ?, Map<K, V>> RemoteCollectors.toMap
(ValueExtractor<? super U1, ? extends K> keyMapper, ValueExtractor<? super U2, ? extends V> valueMapper, Remote.BinaryOperator<V> mergeFunction) Returns aCollector
that accumulates elements into aMap
whose keys and values are the result of applying the provided mapping functions to the input elements.static <T,
U1, U2, K, V, M extends Map<K, V>>
RemoteCollector<T, ?, M> RemoteCollectors.toMap
(ValueExtractor<? super U1, ? extends K> keyExtractor, ValueExtractor<? super U2, ? extends V> valueExtractor, Remote.BinaryOperator<V> mergeFunction, Remote.Supplier<M> mapSupplier) Returns aCollector
that accumulates elements into aMap
whose keys and values are the result of applying the provided mapping functions to the input elements.static <T> RemoteCollector
<T, ?, Set<T>> RemoteCollectors.toSet()
Returns aCollector
that accumulates the input elements into a newSet
.static <T> RemoteCollector
<T, ?, Collection<T>> RemoteCollectors.toSortedBag()
Returns aCollector
that accumulates the input elements into a newSortedBag
.static <T> RemoteCollector
<T, ?, Collection<T>> RemoteCollectors.toSortedBag
(Remote.Comparator<? super T> comparator) Returns aCollector
that accumulates the input elements into a newSortedBag
.static <T,
E extends Comparable<? super E>>
RemoteCollector<T, ?, Collection<T>> RemoteCollectors.toSortedBag
(ValueExtractor<? super T, ? extends E> comparable) Returns aCollector
that accumulates the input elements into a newSortedBag
.static <T> RemoteCollector
<T, ?, Collection<T>> RemoteCollectors.toSortedBag
(Comparator<? super T> comparator) Returns aCollector
that accumulates the input elements into a newSortedBag
.static <T> RemoteCollector
<T, ?, SortedSet<T>> RemoteCollectors.toSortedSet()
Returns aCollector
that accumulates the input elements into a newSortedSet
.static <T> RemoteCollector
<T, ?, SortedSet<T>> RemoteCollectors.toSortedSet
(Remote.Comparator<? super T> comparator) Returns aCollector
that accumulates the input elements into a newSortedSet
.static <T,
E extends Comparable<? super E>>
RemoteCollector<T, ?, SortedSet<T>> RemoteCollectors.toSortedSet
(ValueExtractor<? super T, ? extends E> comparable) Returns aCollector
that accumulates the input elements into a newSortedSet
.static <T> RemoteCollector
<T, ?, SortedSet<T>> RemoteCollectors.toSortedSet
(Comparator<? super T> comparator) Returns aCollector
that accumulates the input elements into a newSortedSet
.static <T> RemoteCollector
<T, ?, List<T>> RemoteCollectors.toUnmodifiableList()
Returns aCollector
that accumulates the input elements into an unmodifiable List in encounter order.static <T,
U1, U2, K, V>
RemoteCollector<T, ?, Map<K, V>> RemoteCollectors.toUnmodifiableMap
(ValueExtractor<? super U1, ? extends K> keyMapper, ValueExtractor<? super U2, ? extends V> valueMapper) Returns aCollector
that accumulates elements into an unmodifiable Map whose keys and values are the result of applying the provided mapping functions to the input elements.static <T,
U1, U2, K, V>
RemoteCollector<T, ?, Map<K, V>> RemoteCollectors.toUnmodifiableMap
(ValueExtractor<? super U1, ? extends K> keyMapper, ValueExtractor<? super U2, ? extends V> valueMapper, Remote.BinaryOperator<V> mergeFunction) Returns aCollector
that accumulates elements into an unmodifiable Map whose keys and values are the result of applying the provided mapping functions to the input elements.static <T> RemoteCollector
<T, ?, Set<T>> RemoteCollectors.toUnmodifiableSet()
Returns aCollector
that accumulates the input elements into an unmodifiable List in encounter order.Modifier and TypeMethodDescription<R,
A> R RemoteStream.collect
(RemoteCollector<? super T, A, R> collector) Performs a mutable reduction operation on the elements of this stream using aCollector
.static <T,
A, R, RR>
RemoteCollector<T, A, RR> RemoteCollectors.collectingAndThen
(RemoteCollector<T, A, R> downstream, Remote.Function<R, RR> finisher) Adapts aCollector
to perform an additional finishing transformation.static <T,
U, K, D, A, M extends Map<K, D>>
RemoteCollector<T, ?, M> RemoteCollectors.groupingBy
(ValueExtractor<? super U, ? extends K> extractor, Remote.Supplier<M> mapFactory, RemoteCollector<? super T, A, D> downstream) Returns aCollector
implementing a cascaded "group by" operation on input elements of typeT
, grouping elements according to a classification function, and then performing a reduction operation on the values associated with a given key using the specified downstreamCollector
.static <T,
U, K, A, D>
RemoteCollector<T, ?, Map<K, D>> RemoteCollectors.groupingBy
(ValueExtractor<? super U, ? extends K> classifier, RemoteCollector<? super T, A, D> downstream) Returns aCollector
implementing a cascaded "group by" operation on input elements of typeT
, grouping elements according to a classification function, and then performing a reduction operation on the values associated with a given key using the specified downstreamCollector
.static <T,
U, A, R>
RemoteCollector<T, A, R> RemoteCollectors.mapping
(Remote.Function<? super T, ? extends U> mapper, RemoteCollector<? super U, A, R> downstream) Adapts aCollector
accepting elements of typeU
to one accepting elements of typeT
by applying a mapping function to each input element before accumulation.