Package | Description |
---|---|
com.hazelcast.jet.aggregate |
Contains
AggregateOperation and several its variants, as well
as a builder object for the aggregate operations. |
com.hazelcast.jet.function |
Serializable variants of functional interfaces from
java.util.function . |
com.hazelcast.jet.stream |
java.util.stream implementation using Hazelcast Jet
|
Modifier and Type | Method and Description |
---|---|
static <T,A> AggregateOperation1<T,MutableReference<A>,A> |
AggregateOperations.reducing(A emptyAccValue,
DistributedFunction<? super T,? extends A> toAccValueFn,
DistributedBinaryOperator<A> combineAccValuesFn,
DistributedBinaryOperator<A> deductAccValueFn)
A reducing operation maintains an accumulated value that starts out as
emptyAccValue and is being iteratively transformed by applying
the combine primitive to it and each stream item's accumulated
value, as returned from toAccValueFn . |
static <T,A> AggregateOperation1<T,MutableReference<A>,A> |
AggregateOperations.reducing(A emptyAccValue,
DistributedFunction<? super T,? extends A> toAccValueFn,
DistributedBinaryOperator<A> combineAccValuesFn,
DistributedBinaryOperator<A> deductAccValueFn)
A reducing operation maintains an accumulated value that starts out as
emptyAccValue and is being iteratively transformed by applying
the combine primitive to it and each stream item's accumulated
value, as returned from toAccValueFn . |
static <T,K,U> AggregateOperation1<T,Map<K,U>,Map<K,U>> |
AggregateOperations.toMap(DistributedFunction<? super T,? extends K> getKeyFn,
DistributedFunction<? super T,? extends U> getValueFn,
DistributedBinaryOperator<U> mergeFn)
Returns an
AggregateOperation1 that accumulates elements
into a HashMap whose keys and values are the result of applying
the provided mapping functions to the input elements. |
static <T,K,U,M extends Map<K,U>> |
AggregateOperations.toMap(DistributedFunction<? super T,? extends K> getKeyFn,
DistributedFunction<? super T,? extends U> getValueFn,
DistributedBinaryOperator<U> mergeFn,
DistributedSupplier<M> createMapFn)
Returns an
AggregateOperation1 that accumulates elements
into a Map whose keys and values are the result of applying the
provided mapping functions to the input elements. |
Modifier and Type | Method and Description |
---|---|
static <T> DistributedBinaryOperator<T> |
DistributedBinaryOperator.maxBy(Comparator<? super T> comparator)
Returns a
DistributedBinaryOperator which returns the greater of two elements
according to the specified Comparator . |
static <T> DistributedBinaryOperator<T> |
DistributedBinaryOperator.minBy(Comparator<? super T> comparator)
Returns a
DistributedBinaryOperator which returns the lesser of two elements
according to the specified Comparator . |
Modifier and Type | Method and Description |
---|---|
DistributedBinaryOperator<A> |
DistributedCollector.combiner()
A function that accepts two partial results and merges them.
|
Modifier and Type | Method and Description |
---|---|
static <T,A,R> DistributedCollector<T,A,R> |
DistributedCollector.of(DistributedSupplier<A> supplier,
DistributedBiConsumer<A,T> accumulator,
DistributedBinaryOperator<A> combiner,
DistributedFunction<A,R> finisher,
java.util.stream.Collector.Characteristics... characteristics)
Returns a new
DistributedCollector described by the given supplier ,
accumulator , combiner , and finisher functions. |
static <T,R> DistributedCollector<T,R,R> |
DistributedCollector.of(DistributedSupplier<R> supplier,
DistributedBiConsumer<R,T> accumulator,
DistributedBinaryOperator<R> combiner,
java.util.stream.Collector.Characteristics... characteristics)
Returns a new
DistributedCollector described by the given supplier ,
accumulator , and combiner functions. |
default Optional<T> |
DistributedStream.reduce(DistributedBinaryOperator<T> accumulator)
Performs a reduction on the
elements of this stream, using an
associative accumulation
function, and returns an
Optional describing the reduced value,
if any. |
default T |
DistributedStream.reduce(T identity,
DistributedBinaryOperator<T> accumulator)
Performs a reduction on the
elements of this stream, using the provided identity value and an
associative
accumulation function, and returns the reduced value.
|
default <U> U |
DistributedStream.reduce(U identity,
DistributedBiFunction<U,? super T,U> accumulator,
DistributedBinaryOperator<U> combiner)
Performs a reduction on the
elements of this stream, using the provided identity, accumulation and
combining functions.
|
static <T> DistributedCollector<T,?,DistributedOptional<T>> |
DistributedCollectors.reducing(DistributedBinaryOperator<T> op)
Returns a
DistributedCollector which performs a reduction of its
input elements under a specified DistributedBinaryOperator . |
static <T> DistributedCollector<T,?,T> |
DistributedCollectors.reducing(T identity,
DistributedBinaryOperator<T> op)
Returns a
DistributedCollector which performs a reduction of its
input elements under a specified DistributedBinaryOperator using the
provided identity. |
static <T,U> DistributedCollector<T,?,U> |
DistributedCollectors.reducing(U identity,
DistributedFunction<? super T,? extends U> mapper,
DistributedBinaryOperator<U> op)
Returns a
DistributedCollector which performs a reduction of its
input elements under a specified mapping function and
DistributedBinaryOperator . |
static <T,K,U> DistributedCollector.Reducer<T,IStreamCache<K,U>> |
DistributedCollectors.toICache(String cacheName,
DistributedFunction<? super T,? extends K> keyMapper,
DistributedFunction<? super T,? extends U> valueMapper,
DistributedBinaryOperator<U> mergeFunction)
Returns a
Reducer that accumulates elements into a
new distributed Hazelcast ICache whose keys and values are the result of applying
the provided mapping functions to the input elements. |
static <T,K,U> DistributedCollector.Reducer<T,IStreamMap<K,U>> |
DistributedCollectors.toIMap(String mapName,
DistributedFunction<? super T,? extends K> keyMapper,
DistributedFunction<? super T,? extends U> valueMapper,
DistributedBinaryOperator<U> mergeFunction)
Returns a
Reducer that accumulates elements into a
new distributed Hazelcast IMap whose keys and values are the result of applying
the provided mapping functions to the input elements. |
static <T,K,U> java.util.stream.Collector<T,?,Map<K,U>> |
DistributedCollectors.toMap(DistributedFunction<? super T,? extends K> keyMapper,
DistributedFunction<? super T,? extends U> valueMapper,
DistributedBinaryOperator<U> mergeFunction)
Returns a
DistributedCollector that accumulates elements into a
Map whose keys and values are the result of applying the provided
mapping functions to the input elements. |
static <T,K,U,M extends Map<K,U>> |
DistributedCollectors.toMap(DistributedFunction<? super T,? extends K> keyMapper,
DistributedFunction<? super T,? extends U> valueMapper,
DistributedBinaryOperator<U> mergeFunction,
DistributedSupplier<M> mapSupplier)
Returns a
DistributedCollector that accumulates elements into a
Map whose keys and values are the result of applying the provided
mapping functions to the input elements. |
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.