Package | Description |
---|---|
com.hazelcast.jet |
The Pipeline API is Jet's high-level API to build and execute
distributed computation jobs.
|
com.hazelcast.jet.core |
Jet's Core API.
|
com.hazelcast.jet.core.processor |
Apache Kafka reader/writer support for Hazelcast Jet.
|
Modifier and Type | Method and Description |
---|---|
default Traverser<T> |
Traverser.append(T item)
Returns a traverser that will return all the items of this traverser,
plus an additional item once this one returns
null . |
default Traverser<T> |
Traverser.dropWhile(java.util.function.Predicate<? super T> pred)
Returns a traverser that will emit a suffix of the original traverser,
starting from the item for which the predicate fails (inclusive).
|
static <T> Traverser<T> |
Traversers.empty()
Returns a traverser that always returns null.
|
default Traverser<T> |
Traverser.filter(java.util.function.Predicate<? super T> filterFn)
Returns a traverser that will emit the same items as this traverser, but
only those that pass the given predicate.
|
default <R> Traverser<R> |
Traverser.flatMap(java.util.function.Function<? super T,? extends Traverser<? extends R>> mapFn)
Returns a traverser traverser that will apply the given mapping function
to each item retrieved from this traverser and emit all the items from
the resulting traverser(s).
|
static <T> Traverser<T> |
Traversers.lazy(java.util.function.Supplier<Traverser<T>> supplierOfTraverser)
Flattens a supplier of traverser into a lazy-initialized traverser.
|
default <R> Traverser<R> |
Traverser.map(java.util.function.Function<? super T,? extends R> mapFn)
Returns a traverser traverser that will emit the results of applying the
mapping function to this traverser's items.
|
default Traverser<T> |
Traverser.onFirstNull(Runnable action)
Returns a traverser that will emit the same items as this traverser and
additionally run the supplied action the first time this traverser
returns
null . |
static <T> Traverser<T> |
Traverser.over(T... items)
Returns a traverser over the supplied arguments (or item array).
|
default Traverser<T> |
Traverser.peek(java.util.function.Consumer<? super T> action)
Returns a traverser that will emit the same items as this traverser,
additionally passing each (non-null) item to the supplied consumer.
|
default Traverser<T> |
Traverser.prepend(T item)
Returns a traverser which prepends an additional item in front of
all the items of this traverser.
|
default Traverser<T> |
Traverser.takeWhile(java.util.function.Predicate<? super T> pred)
Returns a traverser that will emit a prefix of the original traverser,
up to the item for which the predicate fails (exclusive).
|
static <T> Traverser<T> |
Traversers.traverseArray(T[] array)
Returns a traverser over the given array.
|
static <T> Traverser<T> |
Traversers.traverseEnumeration(Enumeration<T> enumeration)
Returns an adapter from
Enumeration to Traverser . |
static <T> Traverser<T> |
Traversers.traverseIterable(Iterable<? extends T> iterable)
Returns a traverser over the given iterable.
|
static <T> Traverser<T> |
Traversers.traverseIterator(Iterator<? extends T> iterator)
Returns an adapter from
Iterator to Traverser . |
static <T> Traverser<T> |
Traversers.traverseSpliterator(Spliterator<T> spliterator)
Returns an adapter from
Spliterator to Traverser . |
static <T> Traverser<T> |
Traversers.traverseStream(java.util.stream.Stream<T> stream)
Returns a traverser over the given stream.
|
Modifier and Type | Method and Description |
---|---|
<R> ComputeStage<R> |
ComputeStage.flatMap(DistributedFunction<? super E,Traverser<? extends R>> flatMapFn)
Attaches to this stage a flat-mapping stage, one which applies the
supplied function to each input item independently and emits all items
from the
Traverser it returns as the output items. |
default <R> Traverser<R> |
Traverser.flatMap(java.util.function.Function<? super T,? extends Traverser<? extends R>> mapFn)
Returns a traverser traverser that will apply the given mapping function
to each item retrieved from this traverser and emit all the items from
the resulting traverser(s).
|
static <T> Traverser<T> |
Traversers.lazy(java.util.function.Supplier<Traverser<T>> supplierOfTraverser)
Flattens a supplier of traverser into a lazy-initialized traverser.
|
Modifier and Type | Class and Description |
---|---|
class |
ResettableSingletonTraverser<T>
Traverses over a single item which can be set from the outside, by using
this traverser as a
Consumer<T> . |
Modifier and Type | Method and Description |
---|---|
protected boolean |
AbstractProcessor.emitFromTraverser(int[] ordinals,
Traverser<?> traverser)
Convenience for
AbstractProcessor.emitFromTraverser(int[], Traverser, Consumer)
which emits to the specified ordinals. |
protected <E> boolean |
AbstractProcessor.emitFromTraverser(int[] ordinals,
Traverser<E> traverser,
java.util.function.Consumer<? super E> onEmit)
Obtains items from the traverser and offers them to the outbox's buckets
identified in the supplied array.
|
protected boolean |
AbstractProcessor.emitFromTraverser(int ordinal,
Traverser<?> traverser)
Convenience for
AbstractProcessor.emitFromTraverser(int, Traverser, Consumer)
which emits to the specified ordinal. |
protected <E> boolean |
AbstractProcessor.emitFromTraverser(int ordinal,
Traverser<E> traverser,
java.util.function.Consumer<? super E> onEmit)
Obtains items from the traverser and offers them to the outbox's buckets
identified in the supplied array.
|
protected boolean |
AbstractProcessor.emitFromTraverser(Traverser<?> traverser)
Convenience for
AbstractProcessor.emitFromTraverser(int, Traverser, Consumer)
which emits to all ordinals. |
protected <E> boolean |
AbstractProcessor.emitFromTraverser(Traverser<E> traverser,
java.util.function.Consumer<? super E> onEmit)
Convenience for
AbstractProcessor.emitFromTraverser(int, Traverser, Consumer)
which emits to all ordinals. |
protected <T extends Map.Entry<?,?>> |
AbstractProcessor.emitFromTraverserToSnapshot(Traverser<T> traverser)
Obtains items from the traverser and offers them to the snapshot bucket
of the outbox.
|
Modifier and Type | Method and Description |
---|---|
protected <T,R> AbstractProcessor.FlatMapper<T,R> |
AbstractProcessor.flatMapper(java.util.function.Function<? super T,? extends Traverser<? extends R>> mapper)
Factory of
AbstractProcessor.FlatMapper . |
protected <T,R> AbstractProcessor.FlatMapper<T,R> |
AbstractProcessor.flatMapper(int[] ordinals,
java.util.function.Function<? super T,? extends Traverser<? extends R>> mapper)
Factory of
AbstractProcessor.FlatMapper . |
protected <T,R> AbstractProcessor.FlatMapper<T,R> |
AbstractProcessor.flatMapper(int ordinal,
java.util.function.Function<? super T,? extends Traverser<? extends R>> mapper)
Factory of
AbstractProcessor.FlatMapper . |
Modifier and Type | Method and Description |
---|---|
static <T,R> DistributedSupplier<Processor> |
Processors.flatMapP(DistributedFunction<T,? extends Traverser<? extends R>> mapper)
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.
|
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.