Uses of Interface
com.hazelcast.function.FunctionEx
Package | Description |
---|---|
com.hazelcast.function |
Serializable and exception-declaring variants of functional interfaces from
java.util.function . |
com.hazelcast.jet |
Hazelcast Jet is a distributed computation engine running on top of
Hazelcast IMDG technology.
|
com.hazelcast.jet.aggregate |
Contains
AggregateOperation and several its variants, as well
as a builder object for the aggregate operations. |
com.hazelcast.jet.core |
Jet's Core API.
|
com.hazelcast.jet.core.processor |
Contains static utility classes with factories of Jet processors.
|
com.hazelcast.jet.grpc |
Contributes
gRPC service factories that can be to apply transformations to
a pipeline which for each input item calls to a gRPC service. |
com.hazelcast.jet.hadoop |
Apache Hadoop read/write support for Hazelcast Jet.
|
com.hazelcast.jet.kafka |
Apache Kafka reader/writer support for Hazelcast Jet.
|
com.hazelcast.jet.pipeline |
The Pipeline API is Jet's high-level API to build and execute
distributed computation jobs.
|
com.hazelcast.jet.pipeline.test |
This package contains various mock sources to help with pipeline testing
and development.
|
com.hazelcast.jet.python |
Contributes a
PythonTransforms.mapUsingPython(com.hazelcast.jet.python.PythonServiceConfig)
transform that allows you to transform Jet pipeline data using a Python
function. |
com.hazelcast.jet.s3 |
AWS S3 read/write support for Hazelcast Jet.
|
-
Uses of FunctionEx in com.hazelcast.function
Methods in com.hazelcast.function that return FunctionEx Modifier and Type Method Description default <V> FunctionEx<T,V>
FunctionEx. andThen(FunctionEx<? super R,? extends V> after)
Serializable
variant ofjava.util.function.Function#andThen(Function)
.default <V> FunctionEx<V,R>
FunctionEx. compose(FunctionEx<? super V,? extends T> before)
Serializable
variant ofjava.util.function.Function#compose(Function)
.static <K> FunctionEx<Map.Entry<K,?>,K>
Functions. entryKey()
Returns a function that extracts the key of aMap.Entry
.static <V> FunctionEx<Map.Entry<?,V>,V>
Functions. entryValue()
Returns a function that extracts the value of aMap.Entry
.static <T> FunctionEx<T,T>
FunctionEx. identity()
Serializable
variant ofjava.util.function.Function#identity()
.static <T> FunctionEx<T,T>
Functions. wholeItem()
Synonym foridentity()
, to be used as a projection function (e.g., key extractor).Methods in com.hazelcast.function with parameters of type FunctionEx Modifier and Type Method Description default <V> BiFunctionEx<T,U,V>
BiFunctionEx. andThen(FunctionEx<? super R,? extends V> after)
Serializable
variant ofjava.util.function.BiFunction#andThen(Function)
.default <V> FunctionEx<T,V>
FunctionEx. andThen(FunctionEx<? super R,? extends V> after)
Serializable
variant ofjava.util.function.Function#andThen(Function)
.static <T, U extends Comparable<? super U>>
ComparatorEx<T>ComparatorEx. comparing(FunctionEx<? super T,? extends U> toKeyFn)
Serializable
variant ofjava.util.Comparator#comparing(Function)
.static <T, U> ComparatorEx<T>
ComparatorEx. comparing(FunctionEx<? super T,? extends U> toKeyFn, ComparatorEx<? super U> keyComparator)
Serializable
variant ofjava.util.Comparator#comparing(Function, Comparator)
.default <V> FunctionEx<V,R>
FunctionEx. compose(FunctionEx<? super V,? extends T> before)
Serializable
variant ofjava.util.function.Function#compose(Function)
.default <U extends Comparable<? super U>>
ComparatorEx<T>ComparatorEx. thenComparing(FunctionEx<? super T,? extends U> toKeyFn)
Serializable
variant ofjava.util.Comparator#thenComparing(Function)
.default <U> ComparatorEx<T>
ComparatorEx. thenComparing(FunctionEx<? super T,? extends U> toKeyFn, ComparatorEx<? super U> keyComparator)
Serializable
variant ofjava.util.Comparator#thenComparing(Function, Comparator)
. -
Uses of FunctionEx in com.hazelcast.jet
Methods in com.hazelcast.jet that return FunctionEx Modifier and Type Method Description static <K, V> FunctionEx<EventJournalCacheEvent<K,V>,V>
Util. cacheEventNewValue()
Returns a projection that extracts the new value from anEventJournalCacheEvent
.static <K, V> FunctionEx<EventJournalCacheEvent<K,V>,Map.Entry<K,V>>
Util. cacheEventToEntry()
Returns a projection that converts theEventJournalCacheEvent
to aMap.Entry
using the event's new value as a value.static <K, V> FunctionEx<EventJournalMapEvent<K,V>,V>
Util. mapEventNewValue()
Returns a projection that extracts the new value from anEventJournalMapEvent
.static <K, V> FunctionEx<EventJournalMapEvent<K,V>,Map.Entry<K,V>>
Util. mapEventToEntry()
Returns a projection that converts theEventJournalMapEvent
to aMap.Entry
using the event's new value as a value. -
Uses of FunctionEx in com.hazelcast.jet.aggregate
Methods in com.hazelcast.jet.aggregate that return FunctionEx Modifier and Type Method Description FunctionEx<? super A,? extends R>
AggregateOperation. exportFn()
A primitive that transforms the accumulator into a result of the aggregation.default FunctionEx<? super A,? extends R>
AggregateOperation. finishFn()
A primitive that transforms the accumulator into a result of the aggregation.Methods in com.hazelcast.jet.aggregate with parameters of type FunctionEx Modifier and Type Method Description <R_NEW> AggregateOperationBuilder.Arity1<T0,A,R_NEW>
AggregateOperationBuilder.Arity1. andExport(FunctionEx<? super A,? extends R_NEW> exportFn)
Registers theexport
primitive.<R_NEW> AggregateOperationBuilder.Arity2<T0,T1,A,R_NEW>
AggregateOperationBuilder.Arity2. andExport(FunctionEx<? super A,? extends R_NEW> exportFn)
Registers theexport
primitive.<R_NEW> AggregateOperationBuilder.Arity3<T0,T1,T2,A,R_NEW>
AggregateOperationBuilder.Arity3. andExport(FunctionEx<? super A,? extends R_NEW> exportFn)
Registers theexport
primitive.<R_NEW> AggregateOperationBuilder.VarArity<A,R_NEW>
AggregateOperationBuilder.VarArity. andExport(FunctionEx<? super A,? extends R_NEW> exportFn)
Registers theexport
primitive.<R_NEW> AggregateOperation1<T0,A,R_NEW>
AggregateOperationBuilder.Arity1. andExportFinish(FunctionEx<? super A,? extends R_NEW> exportFinishFn)
Registers the supplied function as both theexport
andfinish
primitive.<R_NEW> AggregateOperation2<T0,T1,A,R_NEW>
AggregateOperationBuilder.Arity2. andExportFinish(FunctionEx<? super A,? extends R_NEW> exportFinishFn)
Registers the supplied function as both theexport
andfinish
primitive.<R_NEW> AggregateOperation3<T0,T1,T2,A,R_NEW>
AggregateOperationBuilder.Arity3. andExportFinish(FunctionEx<? super A,? extends R_NEW> exportFinishFn)
Registers the supplied function as both theexport
andfinish
primitive.<R_NEW> AggregateOperation<A,R_NEW>
AggregateOperationBuilder.VarArity. andExportFinish(FunctionEx<? super A,? extends R_NEW> exportFinishFn)
Registers the supplied function as both theexport
andfinish
primitive.AggregateOperation1<T0,A,R>
AggregateOperationBuilder.Arity1. andFinish(FunctionEx<? super A,? extends R> finishFn)
Registers the supplied function as thefinish
primitive.AggregateOperation2<T0,T1,A,R>
AggregateOperationBuilder.Arity2. andFinish(FunctionEx<? super A,? extends R> finishFn)
Registers the supplied function as thefinish
primitive.AggregateOperation3<T0,T1,T2,A,R>
AggregateOperationBuilder.Arity3. andFinish(FunctionEx<? super A,? extends R> finishFn)
Registers the supplied function as thefinish
primitive.AggregateOperation<A,R>
AggregateOperationBuilder.VarArity. andFinish(FunctionEx<? super A,? extends R> finishFn)
Registers the supplied function as thefinish
primitive.<R_NEW> AggregateOperation<A,R_NEW>
AggregateOperation. andThen(FunctionEx<? super R,? extends R_NEW> thenFn)
Returns a copy of this aggregate operation, but with theexport
andfinish
primitives composed with the suppliedthenFn
.<R_NEW> AggregateOperation1<T,A,R_NEW>
AggregateOperation1. andThen(FunctionEx<? super R,? extends R_NEW> thenFn)
<R_NEW> AggregateOperation2<T0,T1,A,R_NEW>
AggregateOperation2. andThen(FunctionEx<? super R,? extends R_NEW> thenFn)
<R_NEW> AggregateOperation3<T0,T1,T2,A,R_NEW>
AggregateOperation3. andThen(FunctionEx<? super R,? extends R_NEW> thenFn)
<R> AggregateOperation1<T,Object[],R>
AllOfAggregationBuilder. build(FunctionEx<ItemsByTag,R> exportFinishFn)
Builds and returns the compositeAggregateOperation1
.<R> AggregateOperation<Object[],R>
CoAggregateOperationBuilder. build(FunctionEx<? super ItemsByTag,? extends R> exportFinishFn)
Builds and returns the multi-inputAggregateOperation
.static <T, U, A, R> AggregateOperation1<T,A,R>
AggregateOperations. flatMapping(FunctionEx<? super T,? extends Traverser<? extends U>> flatMapFn, AggregateOperation1<? super U,A,? extends R> downstream)
Adapts an aggregate operation that takes items of typeU
to one that takes items of typeT
, by exploding eachT
into a sequence ofU
s and then accumulating all of them.static <T, K> AggregateOperation1<T,Map<K,List<T>>,Map<K,List<T>>>
AggregateOperations. groupingBy(FunctionEx<? super T,? extends K> keyFn)
Returns an aggregate operation that accumulates the items into aHashMap
where the key is the result of applyingkeyFn
and the value is a list of the items with that key.static <T, K, R, A, M extends Map<K, R>>
AggregateOperation1<T,Map<K,A>,M>AggregateOperations. groupingBy(FunctionEx<? super T,? extends K> keyFn, SupplierEx<M> createMapFn, AggregateOperation1<? super T,A,R> downstream)
Returns anAggregateOperation1
that accumulates the items into aMap
(as obtained fromcreateMapFn
) where the key is the result of applyingkeyFn
and the value is the result of applying the downstream aggregate operation to the items with that key.static <T, K, A, R> AggregateOperation1<T,Map<K,A>,Map<K,R>>
AggregateOperations. groupingBy(FunctionEx<? super T,? extends K> keyFn, AggregateOperation1<? super T,A,R> downstream)
Returns an aggregate operation that accumulates the items into aHashMap
where the key is the result of applyingkeyFn
and the value is the result of applying the downstream aggregate operation to the items with that key.static <T, U, A, R> AggregateOperation1<T,A,R>
AggregateOperations. mapping(FunctionEx<? super T,? extends U> mapFn, AggregateOperation1<? super U,A,? extends R> downstream)
Adapts an aggregate operation that takes items of typeU
to one that takes items of typeT
, by applying the given mapping function to each item.static <T, A> AggregateOperation1<T,MutableReference<A>,A>
AggregateOperations. reducing(A emptyAccValue, FunctionEx<? super T,? extends A> toAccValueFn, BinaryOperatorEx<A> combineAccValuesFn, BinaryOperatorEx<A> deductAccValueFn)
Returns an aggregate operation that constructs the result through the process of immutable reduction: The initial accumulated value isemptyAccValue
.static <T, K, U> AggregateOperation1<T,Map<K,U>,Map<K,U>>
AggregateOperations. toMap(FunctionEx<? super T,? extends K> keyFn, FunctionEx<? super T,? extends U> valueFn)
Returns an aggregate operation that accumulates the items into aHashMap
whose keys and values are the result of applying the provided mapping functions.static <T, K, U> AggregateOperation1<T,Map<K,U>,Map<K,U>>
AggregateOperations. toMap(FunctionEx<? super T,? extends K> keyFn, FunctionEx<? super T,? extends U> valueFn, BinaryOperatorEx<U> mergeFn)
Returns an aggregate operation that accumulates the items into aHashMap
whose keys and values are the result of applying the provided mapping functions.static <T, K, U, M extends Map<K, U>>
AggregateOperation1<T,M,M>AggregateOperations. toMap(FunctionEx<? super T,? extends K> keyFn, FunctionEx<? super T,? extends U> valueFn, BinaryOperatorEx<U> mergeFn, SupplierEx<M> createMapFn)
Returns an aggregate operation that accumulates elements into a user-suppliedMap
instance.default <T> AggregateOperation1<T,A,R>
AggregateOperation. withCombiningAccumulateFn(FunctionEx<T,A> getAccFn)
Returns a copy of this aggregate operation, but with theaccumulate
primitive replaced with one that expects to find accumulator objects in the input items and combines them all into a single accumulator of the same type. -
Uses of FunctionEx in com.hazelcast.jet.core
Methods in com.hazelcast.jet.core with parameters of type FunctionEx Modifier and Type Method Description static ProcessorMetaSupplier
ProcessorMetaSupplier. of(int preferredLocalParallelism, FunctionEx<? super Address,? extends ProcessorSupplier> addressToSupplier)
Factory method that creates aProcessorMetaSupplier
from the supplied function that maps a cluster member address to aProcessorSupplier
.static ProcessorMetaSupplier
ProcessorMetaSupplier. of(FunctionEx<? super Address,? extends ProcessorSupplier> addressToSupplier)
Factory method that creates aProcessorMetaSupplier
from the supplied function that maps a cluster member address to aProcessorSupplier
.<T> Edge
Edge. partitioned(FunctionEx<T,?> extractKeyFn)
Activates thePARTITIONED
routing policy and applies thedefault
Hazelcast partitioning strategy.<T, K> Edge
Edge. partitioned(FunctionEx<T,K> extractKeyFn, Partitioner<? super K> partitioner)
Activates thePARTITIONED
routing policy and applies the provided partitioning strategy. -
Uses of FunctionEx in com.hazelcast.jet.core.processor
Methods in com.hazelcast.jet.core.processor with parameters of type FunctionEx Modifier and Type Method Description static <C, T, S> ProcessorMetaSupplier
SourceProcessors. convenientSourceP(FunctionEx<? super Processor.Context,? extends C> createFn, BiConsumerEx<? super C,? super SourceBuilder.SourceBuffer<T>> fillBufferFn, FunctionEx<? super C,? extends S> createSnapshotFn, BiConsumerEx<? super C,? super List<S>> restoreSnapshotFn, ConsumerEx<? super C> destroyFn, int preferredLocalParallelism, boolean isBatch)
Returns a supplier of processors for a source that the user can create using theSourceBuilder
.static <C, T, S> ProcessorMetaSupplier
SourceProcessors. convenientTimestampedSourceP(FunctionEx<? super Processor.Context,? extends C> createFn, BiConsumerEx<? super C,? super SourceBuilder.TimestampedSourceBuffer<T>> fillBufferFn, EventTimePolicy<? super T> eventTimePolicy, FunctionEx<? super C,? extends S> createSnapshotFn, BiConsumerEx<? super C,? super List<S>> restoreSnapshotFn, ConsumerEx<? super C> destroyFn, int preferredLocalParallelism)
Returns a supplier of processors for a source that the user can create using theSourceBuilder
.static <T, R> SupplierEx<Processor>
Processors. flatMapP(FunctionEx<? super T,? extends Traverser<? extends R>> flatMapFn)
Returns a supplier of processors for a vertex that applies the provided item-to-traverser mapping function to each received item and emits all the items from the resulting traverser.static <T, K, S, R> SupplierEx<Processor>
Processors. flatMapStatefulP(long ttl, FunctionEx<? super T,? extends K> keyFn, ToLongFunctionEx<? super T> timestampFn, Supplier<? extends S> createFn, TriFunction<? super S,? super K,? super T,? extends Traverser<R>> statefulFlatMapFn, TriFunction<? super S,? super K,? super Long,? extends Traverser<R>> onEvictFn)
Returns a supplier of processors for a vertex that performs a stateful flat-mapping of its input.static <T, R> SupplierEx<Processor>
Processors. mapP(FunctionEx<? super T,? extends R> mapFn)
Returns a supplier of processors for a vertex which, for each received item, emits the result of applying the given mapping function to it.static <T, K, S, R> SupplierEx<Processor>
Processors. mapStatefulP(long ttl, FunctionEx<? super T,? extends K> keyFn, ToLongFunctionEx<? super T> timestampFn, Supplier<? extends S> createFn, TriFunction<? super S,? super K,? super T,? extends R> statefulMapFn, TriFunction<? super S,? super K,? super Long,? extends R> onEvictFn)
Returns a supplier of processors for a vertex that performs a stateful mapping of its input.static <C, S, T, K, R>
ProcessorSupplierProcessors. mapUsingServiceAsyncP(ServiceFactory<C,S> serviceFactory, int maxConcurrentOps, boolean preserveOrder, FunctionEx<T,K> extractKeyFn, BiFunctionEx<? super S,? super T,CompletableFuture<R>> mapAsyncFn)
Asynchronous version ofProcessors.mapUsingServiceP(com.hazelcast.jet.pipeline.ServiceFactory<C, S>, com.hazelcast.function.BiFunctionEx<? super S, ? super T, ? extends R>)
: themapAsyncFn
returns aCompletableFuture<R>
instead of justR
.static <T, K, V> ProcessorMetaSupplier
SinkProcessors. mergeMapP(String mapName, FunctionEx<? super T,? extends K> toKeyFn, FunctionEx<? super T,? extends V> toValueFn, BinaryOperatorEx<V> mergeFn)
Returns a supplier of processors forSinks.mapWithMerging(String, FunctionEx, FunctionEx, BinaryOperatorEx)
.static <T, K, V> ProcessorMetaSupplier
SinkProcessors. mergeRemoteMapP(String mapName, ClientConfig clientConfig, FunctionEx<? super T,? extends K> toKeyFn, FunctionEx<? super T,? extends V> toValueFn, BinaryOperatorEx<V> mergeFn)
Returns a supplier of processors forSinks.remoteMapWithMerging(String, ClientConfig, FunctionEx, FunctionEx, BinaryOperatorEx)
.static <T> SupplierEx<Processor>
DiagnosticProcessors. peekInputP(FunctionEx<T,? extends CharSequence> toStringFn, PredicateEx<T> shouldLogFn, SupplierEx<Processor> wrapped)
Same aspeekInput(toStringFn, shouldLogFn, metaSupplier)
, but accepts aSupplierEx
of processors instead of a meta-supplier.static <T> ProcessorMetaSupplier
DiagnosticProcessors. peekInputP(FunctionEx<T,? extends CharSequence> toStringFn, PredicateEx<T> shouldLogFn, ProcessorMetaSupplier wrapped)
Returns a meta-supplier that wraps the provided one and adds a logging layer to each processor it creates.static <T> ProcessorSupplier
DiagnosticProcessors. peekInputP(FunctionEx<T,? extends CharSequence> toStringFn, PredicateEx<T> shouldLogFn, ProcessorSupplier wrapped)
Same aspeekInput(toStringFn, shouldLogFn, metaSupplier)
, but accepts aProcessorSupplier
instead of a meta-supplier.static <T> SupplierEx<Processor>
DiagnosticProcessors. peekOutputP(FunctionEx<? super T,? extends CharSequence> toStringFn, PredicateEx<? super T> shouldLogFn, SupplierEx<Processor> wrapped)
Same aspeekOutput(toStringFn, shouldLogFn, metaSupplier)
, but accepts aSupplierEx
of processors instead of a meta-supplier.static <T> ProcessorMetaSupplier
DiagnosticProcessors. peekOutputP(FunctionEx<? super T,? extends CharSequence> toStringFn, PredicateEx<? super T> shouldLogFn, ProcessorMetaSupplier wrapped)
Returns a meta-supplier that wraps the provided one and adds a logging layer to each processor it creates.static <T> ProcessorSupplier
DiagnosticProcessors. peekOutputP(FunctionEx<? super T,? extends CharSequence> toStringFn, PredicateEx<? super T> shouldLogFn, ProcessorSupplier wrapped)
Same aspeekOutput(toStringFn, shouldLogFn, metaSupplier)
, but accepts aProcessorSupplier
instead of a meta-supplier.static <K, V> SupplierEx<Processor>
DiagnosticProcessors. peekSnapshotP(FunctionEx<? super Map.Entry<K,V>,? extends CharSequence> toStringFn, PredicateEx<? super Map.Entry<K,V>> shouldLogFn, SupplierEx<Processor> wrapped)
Same aspeekSnapshot(toStringFn, shouldLogFn, metaSupplier)
, but accepts aSupplierEx
of processors instead of a meta-supplier.static <K, V> ProcessorMetaSupplier
DiagnosticProcessors. peekSnapshotP(FunctionEx<? super Map.Entry<K,V>,? extends CharSequence> toStringFn, PredicateEx<? super Map.Entry<K,V>> shouldLogFn, ProcessorMetaSupplier wrapped)
Returns a meta-supplier that wraps the provided one and adds a logging layer to each processor it creates.static <K, V> ProcessorSupplier
DiagnosticProcessors. peekSnapshotP(FunctionEx<? super Map.Entry<K,V>,? extends CharSequence> toStringFn, PredicateEx<? super Map.Entry<K,V>> shouldLogFn, ProcessorSupplier wrapped)
Same aspeekSnapshot(toStringFn, shouldLogFn, metaSupplier)
, but accepts aProcessorSupplier
instead of a meta-supplier.static <I> ProcessorMetaSupplier
SourceProcessors. readFilesP(String directory, String glob, boolean sharedFileSystem, FunctionEx<? super Path,? extends Stream<I>> readFileFn)
Returns a supplier of processors forSources.filesBuilder(java.lang.String)
.static <T> ProcessorMetaSupplier
SourceProcessors. readJdbcP(SupplierEx<? extends Connection> newConnectionFn, ToResultSetFunction resultSetFn, FunctionEx<? super ResultSet,? extends T> mapOutputFn)
Returns a supplier of processors forSources.jdbc( SupplierEx, ToResultSetFunction, FunctionEx)
.static <T> ProcessorMetaSupplier
SourceProcessors. readJdbcP(String connectionURL, String query, FunctionEx<? super ResultSet,? extends T> mapOutputFn)
Returns a supplier of processors forSources.jdbc(String, String, FunctionEx)
.static <T, K, V> ProcessorMetaSupplier
SourceProcessors. streamCacheP(String cacheName, PredicateEx<? super EventJournalCacheEvent<K,V>> predicateFn, FunctionEx<? super EventJournalCacheEvent<K,V>,? extends T> projectionFn, JournalInitialPosition initialPos, EventTimePolicy<? super T> eventTimePolicy)
Returns a supplier of processors forSources.cacheJournal(String, JournalInitialPosition, FunctionEx, PredicateEx)
.static <T> ProcessorMetaSupplier
SourceProcessors. streamJmsQueueP(SupplierEx<? extends javax.jms.Connection> newConnectionFn, FunctionEx<? super javax.jms.Session,? extends javax.jms.MessageConsumer> consumerFn, FunctionEx<? super javax.jms.Message,?> messageIdFn, FunctionEx<? super javax.jms.Message,? extends T> projectionFn, EventTimePolicy<? super T> eventTimePolicy, ProcessingGuarantee maxGuarantee)
Returns a supplier of processors forSources.jmsQueueBuilder(com.hazelcast.function.SupplierEx<? extends javax.jms.ConnectionFactory>)
.static <T> ProcessorMetaSupplier
SourceProcessors. streamJmsTopicP(SupplierEx<? extends javax.jms.Connection> newConnectionFn, FunctionEx<? super javax.jms.Session,? extends javax.jms.MessageConsumer> consumerFn, boolean isSharedConsumer, FunctionEx<? super javax.jms.Message,?> messageIdFn, FunctionEx<? super javax.jms.Message,? extends T> projectionFn, EventTimePolicy<? super T> eventTimePolicy, ProcessingGuarantee maxGuarantee)
Returns a supplier of processors forSources.jmsTopicBuilder(com.hazelcast.function.SupplierEx<? extends javax.jms.ConnectionFactory>)
.static <T, K, V> ProcessorMetaSupplier
SourceProcessors. streamMapP(String mapName, PredicateEx<? super EventJournalMapEvent<K,V>> predicateFn, FunctionEx<? super EventJournalMapEvent<K,V>,? extends T> projectionFn, JournalInitialPosition initialPos, EventTimePolicy<? super T> eventTimePolicy)
Returns a supplier of processors forSources.mapJournal(String, JournalInitialPosition, FunctionEx, PredicateEx)
.static <T, K, V> ProcessorMetaSupplier
SourceProcessors. streamRemoteCacheP(String cacheName, ClientConfig clientConfig, PredicateEx<? super EventJournalCacheEvent<K,V>> predicateFn, FunctionEx<? super EventJournalCacheEvent<K,V>,? extends T> projectionFn, JournalInitialPosition initialPos, EventTimePolicy<? super T> eventTimePolicy)
Returns a supplier of processors forSources.remoteCacheJournal(String, ClientConfig, JournalInitialPosition, FunctionEx, PredicateEx)
.static <T, K, V> ProcessorMetaSupplier
SourceProcessors. streamRemoteMapP(String mapName, ClientConfig clientConfig, PredicateEx<? super EventJournalMapEvent<K,V>> predicateFn, FunctionEx<? super EventJournalMapEvent<K,V>,? extends T> projectionFn, JournalInitialPosition initialPos, EventTimePolicy<? super T> eventTimePolicy)
Returns a supplier of processors forSources.remoteMapJournal(String, ClientConfig, JournalInitialPosition, FunctionEx, PredicateEx)
.static <T, K, V> ProcessorMetaSupplier
SinkProcessors. updateMapP(String mapName, FunctionEx<? super T,? extends K> toKeyFn, BiFunctionEx<? super V,? super T,? extends V> updateFn)
Returns a supplier of processors forSinks.mapWithEntryProcessor(String, FunctionEx, FunctionEx)
.static <T, K, V, R> ProcessorMetaSupplier
SinkProcessors. updateMapP(String mapName, FunctionEx<? super T,? extends K> toKeyFn, FunctionEx<? super T,? extends EntryProcessor<K,V,R>> toEntryProcessorFn)
Returns a supplier of processors forSinks.mapWithEntryProcessor(String, FunctionEx, FunctionEx)
.static <T, K, V> ProcessorMetaSupplier
SinkProcessors. updateRemoteMapP(String mapName, ClientConfig clientConfig, FunctionEx<? super T,? extends K> toKeyFn, BiFunctionEx<? super V,? super T,? extends V> updateFn)
Returns a supplier of processors forSinks.remoteMapWithUpdating(String, ClientConfig, FunctionEx , BiFunctionEx)
.static <T, K, V, R> ProcessorMetaSupplier
SinkProcessors. updateRemoteMapP(String mapName, ClientConfig clientConfig, FunctionEx<? super T,? extends K> toKeyFn, FunctionEx<? super T,? extends EntryProcessor<K,V,R>> toEntryProcessorFn)
Returns a supplier of processors forSinks.remoteMapWithEntryProcessor(String, ClientConfig, FunctionEx, FunctionEx)
.static <W, T> SupplierEx<Processor>
SinkProcessors. writeBufferedP(FunctionEx<? super Processor.Context,? extends W> createFn, BiConsumerEx<? super W,? super T> onReceiveFn, ConsumerEx<? super W> flushFn)
Shortcut forSinkProcessors.writeBufferedP(FunctionEx, BiConsumerEx, ConsumerEx, ConsumerEx)
with a no-opdestroyFn
.static <W, T> SupplierEx<Processor>
SinkProcessors. writeBufferedP(FunctionEx<? super Processor.Context,? extends W> createFn, BiConsumerEx<? super W,? super T> onReceiveFn, ConsumerEx<? super W> flushFn, ConsumerEx<? super W> destroyFn)
Returns a supplier of processors for a vertex that drains all the items from the inbox to an internal writer object and then does a flush.static <T> ProcessorMetaSupplier
SinkProcessors. writeFileP(String directoryName, Charset charset, String datePattern, long maxFileSize, boolean exactlyOnce, FunctionEx<? super T,? extends String> toStringFn)
Returns a supplier of processors forSinks.filesBuilder(java.lang.String)
.static <T> ProcessorMetaSupplier
DiagnosticProcessors. writeLoggerP(FunctionEx<T,? extends CharSequence> toStringFn)
Returns a meta-supplier of processors for a sink vertex that logs all the data items it receives.static <T> ProcessorMetaSupplier
SinkProcessors. writeSocketP(String host, int port, FunctionEx<? super T,? extends String> toStringFn, Charset charset)
Returns a supplier of processors forSinks.socket(String, int)
.Method parameters in com.hazelcast.jet.core.processor with type arguments of type FunctionEx Modifier and Type Method Description static <K, A> SupplierEx<Processor>
Processors. accumulateByFrameP(List<FunctionEx<?,? extends K>> keyFns, List<ToLongFunctionEx<?>> timestampFns, TimestampKind timestampKind, SlidingWindowPolicy winPolicy, AggregateOperation<A,?> aggrOp)
Returns a supplier of processors for the first-stage vertex in a two-stage sliding window aggregation setup (see theclass Javadoc
for an explanation of aggregation stages).static <K, A> SupplierEx<Processor>
Processors. accumulateByKeyP(List<FunctionEx<?,? extends K>> getKeyFns, AggregateOperation<A,?> aggrOp)
Returns a supplier of processors for the first-stage vertex in a two-stage group-and-aggregate setup.static <K, A, R, OUT>
SupplierEx<Processor>Processors. aggregateByKeyP(List<FunctionEx<?,? extends K>> keyFns, AggregateOperation<A,R> aggrOp, BiFunctionEx<? super K,? super R,OUT> mapToOutputFn)
Returns a supplier of processors for a vertex that groups items by key and performs the provided aggregate operation on each group.static <K, A, R, OUT>
SupplierEx<Processor>Processors. aggregateToSlidingWindowP(List<FunctionEx<?,? extends K>> keyFns, List<ToLongFunctionEx<?>> timestampFns, TimestampKind timestampKind, SlidingWindowPolicy winPolicy, long earlyResultsPeriod, AggregateOperation<A,? extends R> aggrOp, KeyedWindowResultFunction<? super K,? super R,? extends OUT> mapToOutputFn)
Returns a supplier of processors for a vertex that aggregates events into a sliding window in a single stage (see theclass Javadoc
for an explanation of aggregation stages). -
Uses of FunctionEx in com.hazelcast.jet.grpc
Methods in com.hazelcast.jet.grpc with parameters of type FunctionEx Modifier and Type Method Description static <T, R> ServiceFactory<?,? extends GrpcService<T,R>>
GrpcServices. bidirectionalStreamingService(SupplierEx<? extends io.grpc.ManagedChannelBuilder<?>> channelFn, FunctionEx<? super io.grpc.ManagedChannel,? extends FunctionEx<io.grpc.stub.StreamObserver<R>,io.grpc.stub.StreamObserver<T>>> callStubFn)
Creates aServiceFactory
that calls out to a bidrectional streaming gRPC service.static <T, R> ServiceFactory<?,? extends GrpcService<T,R>>
GrpcServices. unaryService(SupplierEx<? extends io.grpc.ManagedChannelBuilder<?>> channelFn, FunctionEx<? super io.grpc.ManagedChannel,? extends BiConsumerEx<T,io.grpc.stub.StreamObserver<R>>> callStubFn)
Creates aServiceFactory
that calls out to a unary gRPC service.Method parameters in com.hazelcast.jet.grpc with type arguments of type FunctionEx Modifier and Type Method Description static <T, R> ServiceFactory<?,? extends GrpcService<T,R>>
GrpcServices. bidirectionalStreamingService(SupplierEx<? extends io.grpc.ManagedChannelBuilder<?>> channelFn, FunctionEx<? super io.grpc.ManagedChannel,? extends FunctionEx<io.grpc.stub.StreamObserver<R>,io.grpc.stub.StreamObserver<T>>> callStubFn)
Creates aServiceFactory
that calls out to a bidrectional streaming gRPC service. -
Uses of FunctionEx in com.hazelcast.jet.hadoop
Methods in com.hazelcast.jet.hadoop with parameters of type FunctionEx Modifier and Type Method Description static <E, K, V> Sink<E>
HadoopSinks. outputFormat(org.apache.hadoop.conf.Configuration configuration, FunctionEx<? super E,K> extractKeyF, FunctionEx<? super E,V> extractValueF)
Returns a sink that writes to Apache Hadoop HDFS.static <E, K, V> ProcessorMetaSupplier
HadoopProcessors. writeHadoopP(org.apache.hadoop.conf.Configuration configuration, FunctionEx<? super E,K> extractKeyFn, FunctionEx<? super E,V> extractValueFn)
Returns a supplier of processors forHadoopSinks.outputFormat(Configuration, FunctionEx, FunctionEx)
. -
Uses of FunctionEx in com.hazelcast.jet.kafka
Methods in com.hazelcast.jet.kafka with parameters of type FunctionEx Modifier and Type Method Description KafkaSinks.Builder<E>
KafkaSinks.Builder. extractKeyFn(FunctionEx<? super E,?> extractKeyFn)
Sets the function to extract the key from the stream items.KafkaSinks.Builder<E>
KafkaSinks.Builder. extractValueFn(FunctionEx<? super E,?> extractValueFn)
Sets the function to extract the value from the stream items.static <E, K, V> Sink<E>
KafkaSinks. kafka(Properties properties, FunctionEx<? super E,org.apache.kafka.clients.producer.ProducerRecord<K,V>> toRecordFn)
Returns a sink that publishes messages to Apache Kafka topic(s).static <E, K, V> Sink<E>
KafkaSinks. kafka(Properties properties, String topic, FunctionEx<? super E,K> extractKeyFn, FunctionEx<? super E,V> extractValueFn)
Convenience forKafkaSinks.kafka(Properties, FunctionEx)
which creates aProducerRecord
using the given topic and the given key and value mapping functionsstatic <K, V, T> StreamSource<T>
KafkaSources. kafka(Properties properties, FunctionEx<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>,T> projectionFn, String... topics)
Returns a source that consumes one or more Apache Kafka topics and emits items from them asMap.Entry
instances.static <K, V, T> ProcessorMetaSupplier
KafkaProcessors. streamKafkaP(Properties properties, FunctionEx<? super org.apache.kafka.clients.consumer.ConsumerRecord<K,V>,? extends T> projectionFn, EventTimePolicy<? super T> eventTimePolicy, String... topics)
Returns a supplier of processors forKafkaSources.kafka(Properties, FunctionEx, String...)
.KafkaSinks.Builder<E>
KafkaSinks.Builder. toRecordFn(FunctionEx<? super E,? extends org.apache.kafka.clients.producer.ProducerRecord<?,?>> toRecordFn)
Sets the function to convert stream items into Kafka'sProducerRecord
.static <T, K, V> ProcessorMetaSupplier
KafkaProcessors. writeKafkaP(Properties properties, FunctionEx<? super T,? extends org.apache.kafka.clients.producer.ProducerRecord<K,V>> toRecordFn, boolean exactlyOnce)
Returns a supplier of processors forKafkaSinks.kafka(Properties, FunctionEx)
.static <T, K, V> ProcessorMetaSupplier
KafkaProcessors. writeKafkaP(Properties properties, String topic, FunctionEx<? super T,? extends K> extractKeyFn, FunctionEx<? super T,? extends V> extractValueFn, boolean exactlyOnce)
Returns a supplier of processors forKafkaSinks.kafka(Properties, String, FunctionEx, FunctionEx)
. -
Uses of FunctionEx in com.hazelcast.jet.pipeline
Methods in com.hazelcast.jet.pipeline that return FunctionEx Modifier and Type Method Description FunctionEx<? super ProcessorSupplier.Context,? extends C>
ServiceFactory. createContextFn()
Returns the function that creates the shared context object.FunctionEx<? super T,? extends K>
GeneralStageWithKey. keyFn()
Returns the function that extracts the key from stream items.FunctionEx<? super T,? extends K>
StageWithKeyAndWindow. keyFn()
Returns the function that extracts the grouping key from stream items.FunctionEx<? super T0,? extends K>
JoinClause. leftKeyFn()
Returns the left-hand key extractor function.FunctionEx<? super T1,? extends K>
JoinClause. rightKeyFn()
Returns the right-hand key extractor function.FunctionEx<? super T1,? extends T1_OUT>
JoinClause. rightProjectFn()
Returns the right-hand projection function.Methods in com.hazelcast.jet.pipeline with parameters of type FunctionEx Modifier and Type Method Description default <R> BatchStage<R>
BatchStage. apply(FunctionEx<? super BatchStage<T>,? extends BatchStage<R>> transformFn)
Transformsthis
stage using the providedtransformFn
and returns the transformed stage.default <R> StreamStage<R>
StreamStage. apply(FunctionEx<? super StreamStage<T>,? extends StreamStage<R>> transformFn)
Transformsthis
stage using the providedtransformFn
and returns the transformed stage.static <C> SourceBuilder.Batch<Void>
SourceBuilder. batch(String name, FunctionEx<? super Processor.Context,? extends C> createFn)
Returns a fluent-API builder with which you can create a batch source for a Jet pipeline.<R> BatchStage<R>
AggregateBuilder. build(FunctionEx<? super ItemsByTag,? extends R> finishFn)
Creates and returns a pipeline stage that performs the co-aggregation of the stages registered with this builder object.<T> BatchSource<T>
FileSourceBuilder. build(FunctionEx<? super Path,? extends Stream<T>> readFileFn)
Builds a custom fileBatchSource
with supplied components.<T> StreamSource<T>
JmsSourceBuilder. build(FunctionEx<? super javax.jms.Message,? extends T> projectionFn)
Creates and returns the JMSStreamSource
with the supplied components and the projection functionprojectionFn
.static <T, K, V> StreamSource<T>
Sources. cacheJournal(String cacheName, JournalInitialPosition initialPos, FunctionEx<? super EventJournalCacheEvent<K,V>,? extends T> projectionFn, PredicateEx<? super EventJournalCacheEvent<K,V>> predicateFn)
Returns a source that will stream theEventJournalCacheEvent
events of a HazelcastICache
with the specified name.JmsSinkBuilder<T>
JmsSinkBuilder. connectionFn(FunctionEx<javax.jms.ConnectionFactory,javax.jms.Connection> connectionFn)
Sets the function which creates a connection given a connection factory.JmsSourceBuilder
JmsSourceBuilder. connectionFn(FunctionEx<? super javax.jms.ConnectionFactory,? extends javax.jms.Connection> connectionFn)
Sets the function which creates the connection using the connection factory.JmsSourceBuilder
JmsSourceBuilder. consumerFn(FunctionEx<? super javax.jms.Session,? extends javax.jms.MessageConsumer> consumerFn)
Sets the function which creates the message consumer from session.<S> SourceBuilder.FaultTolerant<SourceBuilder.Stream<T>,S>
SourceBuilder.Stream. createSnapshotFn(FunctionEx<? super C,? extends S> createSnapshotFn)
<S> SourceBuilder.FaultTolerant<SourceBuilder.TimestampedStream<T>,S>
SourceBuilder.TimestampedStream. createSnapshotFn(FunctionEx<? super C,? extends S> createSnapshotFn)
<R> BatchStage<R>
BatchStage. flatMap(FunctionEx<? super T,? extends Traverser<R>> flatMapFn)
<R> GeneralStage<R>
GeneralStage. flatMap(FunctionEx<? super T,? extends Traverser<R>> flatMapFn)
Attaches a flat-mapping stage which applies the supplied function to each input item independently and emits all the items from theTraverser
it returns.<R> StreamStage<R>
StreamStage. flatMap(FunctionEx<? super T,? extends Traverser<R>> flatMapFn)
<K> BatchStageWithKey<T,K>
BatchStage. groupingKey(FunctionEx<? super T,? extends K> keyFn)
Specifies the function that will extract a key from the items in the associated pipeline stage.<K> GeneralStageWithKey<T,K>
GeneralStage. groupingKey(FunctionEx<? super T,? extends K> keyFn)
Specifies the function that will extract a key from the items in the associated pipeline stage.<K> StageWithKeyAndWindow<T,K>
StageWithWindow. groupingKey(FunctionEx<? super T,? extends K> keyFn)
Specifies the function that will extract the grouping key from the items in the associated pipeline stage and moves on to the step in which you'll complete the construction of a windowed group-and-aggregate stage.<K> StreamStageWithKey<T,K>
StreamStage. groupingKey(FunctionEx<? super T,? extends K> keyFn)
static <T> BatchSource<T>
Sources. jdbc(SupplierEx<? extends Connection> newConnectionFn, ToResultSetFunction resultSetFn, FunctionEx<? super ResultSet,? extends T> createOutputFn)
Returns a source which connects to the specified database using the givennewConnectionFn
, queries the database and creates a result set using the the givenresultSetFn
.static <T> BatchSource<T>
Sources. jdbc(String connectionURL, String query, FunctionEx<? super ResultSet,? extends T> createOutputFn)
Convenience forSources.jdbc(SupplierEx, ToResultSetFunction, FunctionEx)
.static <K, T0, T1_OUT>
JoinClause<K,T0,Map.Entry<K,T1_OUT>,T1_OUT>JoinClause. joinMapEntries(FunctionEx<? super T0,? extends K> leftKeyFn)
A shorthand factory for the common case of hash-joining with a stream of map entries.static <T> Sink<T>
Sinks. logger(FunctionEx<? super T,String> toStringFn)
Returns a sink that logs all the data items it receives, at the INFO level to the log categoryWriteLoggerP
.<R> BatchStage<R>
BatchStage. map(FunctionEx<? super T,? extends R> mapFn)
<R> GeneralStage<R>
GeneralStage. map(FunctionEx<? super T,? extends R> mapFn)
Attaches a mapping stage which applies the given function to each input item independently and emits the function's result as the output item.<R> StreamStage<R>
StreamStage. map(FunctionEx<? super T,? extends R> mapFn)
static <T, K, V> StreamSource<T>
Sources. mapJournal(IMap<? extends K,? extends V> map, JournalInitialPosition initialPos, FunctionEx<? super EventJournalMapEvent<K,V>,? extends T> projectionFn, PredicateEx<? super EventJournalMapEvent<K,V>> predicateFn)
Returns a source that will streamEventJournalMapEvent
s of the given HazelcastIMap
.static <T, K, V> StreamSource<T>
Sources. mapJournal(String mapName, JournalInitialPosition initialPos, FunctionEx<? super EventJournalMapEvent<K,V>,? extends T> projectionFn, PredicateEx<? super EventJournalMapEvent<K,V>> predicateFn)
Returns a source that will streamEventJournalMapEvent
s of the HazelcastIMap
with the specified name.default <K, V, R> BatchStage<R>
BatchStage. mapUsingIMap(IMap<K,V> iMap, FunctionEx<? super T,? extends K> lookupKeyFn, BiFunctionEx<? super T,? super V,? extends R> mapFn)
default <K, V, R> BatchStage<R>
BatchStage. mapUsingIMap(String mapName, FunctionEx<? super T,? extends K> lookupKeyFn, BiFunctionEx<? super T,? super V,? extends R> mapFn)
default <K, V, R> GeneralStage<R>
GeneralStage. mapUsingIMap(IMap<K,V> iMap, FunctionEx<? super T,? extends K> lookupKeyFn, BiFunctionEx<? super T,? super V,? extends R> mapFn)
Attaches a mapping stage where for each item a lookup in the suppliedIMap
is performed and the result of the lookup is merged with the item and emitted.default <K, V, R> GeneralStage<R>
GeneralStage. mapUsingIMap(String mapName, FunctionEx<? super T,? extends K> lookupKeyFn, BiFunctionEx<? super T,? super V,? extends R> mapFn)
Attaches a mapping stage where for each item a lookup in theIMap
with the supplied name is performed and the result of the lookup is merged with the item and emitted.default <K, V, R> StreamStage<R>
StreamStage. mapUsingIMap(IMap<K,V> iMap, FunctionEx<? super T,? extends K> lookupKeyFn, BiFunctionEx<? super T,? super V,? extends R> mapFn)
default <K, V, R> StreamStage<R>
StreamStage. mapUsingIMap(String mapName, FunctionEx<? super T,? extends K> lookupKeyFn, BiFunctionEx<? super T,? super V,? extends R> mapFn)
default <K, V, R> BatchStage<R>
BatchStage. mapUsingReplicatedMap(ReplicatedMap<K,V> replicatedMap, FunctionEx<? super T,? extends K> lookupKeyFn, BiFunctionEx<? super T,? super V,? extends R> mapFn)
default <K, V, R> BatchStage<R>
BatchStage. mapUsingReplicatedMap(String mapName, FunctionEx<? super T,? extends K> lookupKeyFn, BiFunctionEx<? super T,? super V,? extends R> mapFn)
default <K, V, R> GeneralStage<R>
GeneralStage. mapUsingReplicatedMap(ReplicatedMap<K,V> replicatedMap, FunctionEx<? super T,? extends K> lookupKeyFn, BiFunctionEx<? super T,? super V,? extends R> mapFn)
Attaches a mapping stage where for each item a lookup in the suppliedReplicatedMap
is performed and the result of the lookup is merged with the item and emitted.default <K, V, R> GeneralStage<R>
GeneralStage. mapUsingReplicatedMap(String mapName, FunctionEx<? super T,? extends K> lookupKeyFn, BiFunctionEx<? super T,? super V,? extends R> mapFn)
Attaches a mapping stage where for each item a lookup in theReplicatedMap
with the supplied name is performed and the result of the lookup is merged with the item and emitted.default <K, V, R> StreamStage<R>
StreamStage. mapUsingReplicatedMap(ReplicatedMap<K,V> replicatedMap, FunctionEx<? super T,? extends K> lookupKeyFn, BiFunctionEx<? super T,? super V,? extends R> mapFn)
default <K, V, R> StreamStage<R>
StreamStage. mapUsingReplicatedMap(String mapName, FunctionEx<? super T,? extends K> lookupKeyFn, BiFunctionEx<? super T,? super V,? extends R> mapFn)
static <T, K, V, R> Sink<T>
Sinks. mapWithEntryProcessor(IMap<? super K,? super V> map, FunctionEx<? super T,? extends K> toKeyFn, FunctionEx<? super T,? extends EntryProcessor<K,V,R>> toEntryProcessorFn)
Returns a sink that uses the items it receives to createEntryProcessor
s it submits to a HazelcastIMap
with the specified name.static <E, K, V, R> Sink<E>
Sinks. mapWithEntryProcessor(String mapName, FunctionEx<? super E,? extends K> toKeyFn, FunctionEx<? super E,? extends EntryProcessor<K,V,R>> toEntryProcessorFn)
Returns a sink that uses the items it receives to createEntryProcessor
s it submits to a HazelcastIMap
with the specified name.static <T, K, V> Sink<T>
Sinks. mapWithMerging(IMap<? super K,? super V> map, FunctionEx<? super T,? extends K> toKeyFn, FunctionEx<? super T,? extends V> toValueFn, BinaryOperatorEx<V> mergeFn)
Returns a sink that uses the supplied functions to extract the key and value with which to update a HazelcastIMap
.static <T, K, V> Sink<T>
Sinks. mapWithMerging(String mapName, FunctionEx<? super T,? extends K> toKeyFn, FunctionEx<? super T,? extends V> toValueFn, BinaryOperatorEx<V> mergeFn)
Returns a sink that uses the supplied functions to extract the key and value with which to update a HazelcastIMap
.static <T, K, V> Sink<T>
Sinks. mapWithUpdating(IMap<? super K,? super V> map, FunctionEx<? super T,? extends K> toKeyFn, BiFunctionEx<? super V,? super T,? extends V> updateFn)
Returns a sink that uses the supplied key-extracting and value-updating functions to update a HazelcastIMap
.static <T, K, V> Sink<T>
Sinks. mapWithUpdating(String mapName, FunctionEx<? super T,? extends K> toKeyFn, BiFunctionEx<? super V,? super T,? extends V> updateFn)
Returns a sink that uses the supplied key-extracting and value-updating functions to update a HazelcastIMap
.JmsSourceBuilder
JmsSourceBuilder. messageIdFn(FunctionEx<? super javax.jms.Message,?> messageIdFn)
Configures the function to extract IDs from the messages, if exactly-once guarantee is used.static <S> ServiceFactory<?,S>
ServiceFactories. nonSharedService(FunctionEx<? super Processor.Context,? extends S> createServiceFn)
A variant ofnonSharedService(createFn, destroyFn)
with a no-opdestroyFn
.static <S> ServiceFactory<?,S>
ServiceFactories. nonSharedService(FunctionEx<? super Processor.Context,? extends S> createServiceFn, ConsumerEx<? super S> destroyServiceFn)
Returns aServiceFactory
which creates a separate service instance for each parallel Jet processor.static <K, T0, T1> JoinClause<K,T0,T1,T1>
JoinClause. onKeys(FunctionEx<? super T0,? extends K> leftKeyFn, FunctionEx<? super T1,? extends K> rightKeyFn)
Constructs and returns a join clause with the supplied left-hand and right-hand key extractor functions, and with an identity right-hand projection function.default BatchStage<T>
BatchStage. peek(FunctionEx<? super T,? extends CharSequence> toStringFn)
BatchStage<T>
BatchStage. peek(PredicateEx<? super T> shouldLogFn, FunctionEx<? super T,? extends CharSequence> toStringFn)
default GeneralStage<T>
GeneralStage. peek(FunctionEx<? super T,? extends CharSequence> toStringFn)
Adds a peeking layer to this compute stage which logs its output.GeneralStage<T>
GeneralStage. peek(PredicateEx<? super T> shouldLogFn, FunctionEx<? super T,? extends CharSequence> toStringFn)
Attaches a peeking stage which logs this stage's output and passes it through without transformation.default StreamStage<T>
StreamStage. peek(FunctionEx<? super T,? extends CharSequence> toStringFn)
StreamStage<T>
StreamStage. peek(PredicateEx<? super T> shouldLogFn, FunctionEx<? super T,? extends CharSequence> toStringFn)
<T1_NEW_OUT>
JoinClause<K,T0,T1,T1_NEW_OUT>JoinClause. projecting(FunctionEx<? super T1,? extends T1_NEW_OUT> rightProjectFn)
Returns a copy of this join clause, but with the right-hand projection function replaced with the supplied one.static <T, K, V> StreamSource<T>
Sources. remoteCacheJournal(String cacheName, ClientConfig clientConfig, JournalInitialPosition initialPos, FunctionEx<? super EventJournalCacheEvent<K,V>,? extends T> projectionFn, PredicateEx<? super EventJournalCacheEvent<K,V>> predicateFn)
Returns a source that will stream theEventJournalCacheEvent
events of the HazelcastICache
with the specified name from a remote cluster.static <T, K, V> StreamSource<T>
Sources. remoteMapJournal(String mapName, ClientConfig clientConfig, JournalInitialPosition initialPos, FunctionEx<? super EventJournalMapEvent<K,V>,? extends T> projectionFn, PredicateEx<? super EventJournalMapEvent<K,V>> predicateFn)
Returns a source that will stream theEventJournalMapEvent
events of the HazelcastIMap
with the specified name from a remote cluster.static <E, K, V, R> Sink<E>
Sinks. remoteMapWithEntryProcessor(String mapName, ClientConfig clientConfig, FunctionEx<? super E,? extends K> toKeyFn, FunctionEx<? super E,? extends EntryProcessor<K,V,R>> toEntryProcessorFn)
Returns a sink equivalent toSinks.mapWithEntryProcessor(java.lang.String, com.hazelcast.function.FunctionEx<? super E, ? extends K>, com.hazelcast.function.FunctionEx<? super E, ? extends com.hazelcast.map.EntryProcessor<K, V, R>>)
, but for a map in a remote Hazelcast cluster identified by the suppliedClientConfig
.static <T, K, V> Sink<T>
Sinks. remoteMapWithMerging(String mapName, ClientConfig clientConfig, FunctionEx<? super T,? extends K> toKeyFn, FunctionEx<? super T,? extends V> toValueFn, BinaryOperatorEx<V> mergeFn)
Returns a sink equivalent toSinks.mapWithMerging(String, BinaryOperatorEx)
, but for a map in a remote Hazelcast cluster identified by the suppliedClientConfig
.static <T, K, V> Sink<T>
Sinks. remoteMapWithUpdating(String mapName, ClientConfig clientConfig, FunctionEx<? super T,? extends K> toKeyFn, BiFunctionEx<? super V,? super T,? extends V> updateFn)
Returns a sink equivalent toSinks.mapWithUpdating(java.lang.String, com.hazelcast.function.FunctionEx<? super T, ? extends K>, com.hazelcast.function.BiFunctionEx<? super V, ? super T, ? extends V>)
, but for a map in a remote Hazelcast cluster identified by the suppliedClientConfig
.static <S> ServiceFactory<?,S>
ServiceFactories. sharedService(FunctionEx<? super ProcessorSupplier.Context,S> createServiceFn)
A variant ofsharedService(createFn, destroyFn)
with a no-opdestroyFn
.static <S> ServiceFactory<?,S>
ServiceFactories. sharedService(FunctionEx<? super ProcessorSupplier.Context,S> createServiceFn, ConsumerEx<S> destroyServiceFn)
Returns aServiceFactory
which will provide a single shared service object per cluster member.static <C> SinkBuilder<C,Void>
SinkBuilder. sinkBuilder(String name, FunctionEx<Processor.Context,? extends C> createFn)
Returns a builder object that offers a step-by-step fluent API to build a customSink
for the Pipeline API.static <T> Sink<T>
Sinks. socket(String host, int port, FunctionEx<? super T,? extends String> toStringFn)
Convenience forSinks.socket(String, int, FunctionEx, Charset)
with UTF-8 as the charset.static <T> Sink<T>
Sinks. socket(String host, int port, FunctionEx<? super T,? extends String> toStringFn, Charset charset)
Returns a sink that connects to the specified TCP socket and writes to it a string representation of the items it receives.static <C> SourceBuilder.Stream<Void>
SourceBuilder. stream(String name, FunctionEx<? super Processor.Context,? extends C> createFn)
Returns a fluent-API builder with which you can create an unbounded stream source for a Jet pipeline.static <C> SourceBuilder.TimestampedStream<Void>
SourceBuilder. timestampedStream(String name, FunctionEx<? super Processor.Context,? extends C> createFn)
Returns a fluent-API builder with which you can create an unbounded stream source for a Jet pipeline.FileSinkBuilder<T>
FileSinkBuilder. toStringFn(FunctionEx<? super T,String> toStringFn)
Sets the function which converts the item to its string representation.static <C> ServiceFactory<C,Void>
ServiceFactory. withCreateContextFn(FunctionEx<? super ProcessorSupplier.Context,? extends C> createContextFn)
Creates a newServiceFactory
with the given function that creates the shared context object. -
Uses of FunctionEx in com.hazelcast.jet.pipeline.test
Methods in com.hazelcast.jet.pipeline.test that return FunctionEx Modifier and Type Method Description static <T> FunctionEx<BatchStage<T>,BatchStage<T>>
Assertions. assertAnyOrder(String message, Collection<? extends T> expected)
Asserts that the previous stage emitted the expected items in any order, but nothing else.static <T> FunctionEx<BatchStage<T>,BatchStage<T>>
Assertions. assertAnyOrder(Collection<? extends T> expected)
Asserts that the previous stage emitted the expected items in any order, but nothing else.static <T> FunctionEx<BatchStage<T>,BatchStage<T>>
Assertions. assertCollected(ConsumerEx<? super List<T>> assertFn)
Collects all the received items in a list and once the upstream stage is completed it executes the assertion supplied byassertFn
.static <T> FunctionEx<StreamStage<T>,StreamStage<T>>
Assertions. assertCollectedEventually(int timeout, ConsumerEx<? super List<T>> assertFn)
Collects all the received items into a list and runs theassertFn
every time a new item is received.static <T> FunctionEx<BatchStage<T>,BatchStage<T>>
Assertions. assertContains(String message, Collection<? extends T> expected)
Asserts that the previous stage emitted all of the given items in any order.static <T> FunctionEx<BatchStage<T>,BatchStage<T>>
Assertions. assertContains(Collection<? extends T> expected)
Asserts that the previous stage emitted all of the given items in any order.static <T> FunctionEx<BatchStage<T>,BatchStage<T>>
Assertions. assertOrdered(String message, Collection<? extends T> expected)
Asserts that the previous stage emitted the exact sequence of expected items and nothing else.static <T> FunctionEx<BatchStage<T>,BatchStage<T>>
Assertions. assertOrdered(Collection<? extends T> expected)
Asserts that the previous stage emitted the exact sequence of expected items and nothing else. -
Uses of FunctionEx in com.hazelcast.jet.python
Methods in com.hazelcast.jet.python that return FunctionEx Modifier and Type Method Description static <K> FunctionEx<StreamStage<String>,StreamStage<String>>
PythonTransforms. mapUsingPython(FunctionEx<? super String,? extends K> keyFn, PythonServiceConfig cfg)
A stage-transforming method that adds a partitioned "map using Python" pipeline stage.static FunctionEx<StreamStage<String>,StreamStage<String>>
PythonTransforms. mapUsingPython(PythonServiceConfig cfg)
A stage-transforming method that adds a "map using Python" pipeline stage.static <K> FunctionEx<BatchStage<String>,BatchStage<String>>
PythonTransforms. mapUsingPythonBatch(FunctionEx<? super String,? extends K> keyFn, PythonServiceConfig cfg)
A stage-transforming method that adds a partitioned "map using Python" pipeline stage.static FunctionEx<BatchStage<String>,BatchStage<String>>
PythonTransforms. mapUsingPythonBatch(PythonServiceConfig cfg)
A stage-transforming method that adds a "map using Python" pipeline stage.Methods in com.hazelcast.jet.python with parameters of type FunctionEx Modifier and Type Method Description static <K> FunctionEx<StreamStage<String>,StreamStage<String>>
PythonTransforms. mapUsingPython(FunctionEx<? super String,? extends K> keyFn, PythonServiceConfig cfg)
A stage-transforming method that adds a partitioned "map using Python" pipeline stage.static <K> FunctionEx<BatchStage<String>,BatchStage<String>>
PythonTransforms. mapUsingPythonBatch(FunctionEx<? super String,? extends K> keyFn, PythonServiceConfig cfg)
A stage-transforming method that adds a partitioned "map using Python" pipeline stage. -
Uses of FunctionEx in com.hazelcast.jet.s3
Methods in com.hazelcast.jet.s3 with parameters of type FunctionEx Modifier and Type Method Description static <T> Sink<? super T>
S3Sinks. s3(String bucketName, String prefix, Charset charset, SupplierEx<? extends software.amazon.awssdk.services.s3.S3Client> clientSupplier, FunctionEx<? super T,String> toStringFn)
Creates an AWS S3Sink
which writes items to files into the given bucket.static <I, T> BatchSource<T>
S3Sources. s3(List<String> bucketNames, String prefix, SupplierEx<? extends software.amazon.awssdk.services.s3.S3Client> clientSupplier, FunctionEx<? super InputStream,? extends Stream<I>> readFileFn, BiFunctionEx<String,? super I,? extends T> mapFn)
Creates an AWS S3BatchSource
which lists all the objects in the bucket-list using givenprefix
, reads them using providedreadFileFn
, transforms each read item to the desired output object using givenmapFn
and emits them to downstream.