TimestampedTupleForwarder¶
TimestampedTupleForwarder is used by processors to determine whether or not to forward records to child nodes (downstream processors) (that happens only with no caching).
Creating Instance¶
TimestampedTupleForwarder takes the following to be created:
- StateStore
- ProcessorContext
-
TimestampedCacheFlushListener -
sendOldValuesflag
TimestampedTupleForwarder is created when:
KStreamAggregateProcessoris requested to initializeKStreamSlidingWindowAggregateProcessoris requested to initializeKStreamWindowAggregateProcessoris requested to initializeKTableSourceis requested to initialize- others
cachingEnabled Flag¶
TimestampedTupleForwarder requests the StateStore to setFlushListener when created. The returned value is used to initialize cachingEnabled internal flag for maybeForward.
maybeForward¶
void maybeForward(
K key,
V newValue,
V oldValue) // (1)
void maybeForward(
K key,
V newValue,
V oldValue,
long timestamp)
void maybeForward(
Record<K, Change<V>> record)
maybeForward requests the InternalProcessorContext to forward a record only with the cachingEnabled flag disabled.