T
- type of emitted itemspublic class ParallelStreamP<T> extends AbstractProcessor
AbstractProcessor.FlatMapper<T,R>
Processor.Context
Constructor and Description |
---|
ParallelStreamP(long eventsPerSecondPerGenerator,
EventTimePolicy<? super T> eventTimePolicy,
List<? extends GeneratorFunction<T>> generators)
Creates a processor that generates items using its assigned
generator functions.
|
Modifier and Type | Method and Description |
---|---|
boolean |
complete()
Called after all the inbound edges' streams are exhausted.
|
protected void |
init(Processor.Context context)
Method that can be overridden to perform any necessary initialization
for the processor.
|
emitFromTraverser, emitFromTraverser, emitFromTraverser, emitFromTraverserToSnapshot, flatMapper, flatMapper, flatMapper, getLogger, getOutbox, init, keyedWatermarkCheck, process, restoreFromSnapshot, restoreFromSnapshot, tryEmit, tryEmit, tryEmit, tryEmitToSnapshot, tryProcess, tryProcess0, tryProcess1, tryProcess2, tryProcess3, tryProcess4, tryProcessWatermark
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, closeIsCooperative, completeEdge, finishSnapshotRestore, isCooperative, saveToSnapshot, snapshotCommitFinish, snapshotCommitPrepare, tryProcess, tryProcessWatermark
public ParallelStreamP(long eventsPerSecondPerGenerator, EventTimePolicy<? super T> eventTimePolicy, List<? extends GeneratorFunction<T>> generators)
eventsPerSecondPerGenerator
- the desired event rate for each generatoreventTimePolicy
- parameters for watermark generationgenerators
- list of generator functions used in sourceprotected void init(@Nonnull Processor.Context context)
AbstractProcessor
process()
and
Processor.complete()
), but after the outbox and logger
have been initialized.
Subclasses are not required to call this superclass method, it does nothing.
init
in class AbstractProcessor
context
- the context
associated with this
processorpublic boolean complete()
Processor
false
, it will be invoked again until it returns true
.
For example, a streaming source processor will return false
forever. Unlike other methods which guarantee that no other method is
called until they return true
, Processor.saveToSnapshot()
can be
called even though this method returned false
.
After this method is called, no other processing methods are called on
this processor, except for Processor.snapshotCommitFinish(boolean)
.
Non-cooperative processors are required to return from this method from time to time to give the system a chance to check for snapshot requests and job cancellation. The time the processor spends in this method affects the latency of snapshots and job cancellations.
true
if the completing step is now done, false
to call this method againCopyright © 2024 Hazelcast, Inc.. All rights reserved.