SessionWindowedKStreamImpl — Default SessionWindowedKStream

SessionWindowedKStreamImpl is a concrete AbstractStream and a SessionWindowedKStream (with the default implementation of aggregate, count and reduce operators).

SessionWindowedKStreamImpl is created exclusively when KGroupedStreamImpl is requested to windowedBy (with a SessionWindows).

Table 1. SessionWindowedKStreamImpl’s Internal Properties (e.g. Registries, Counters and Flags)
Name Description

countMerger

Merger of K keys and Long values that simply adds two values together.

Used as the merger in count

reduceInitializer

Initializer<V> that simply returns null when executed.

Used as the initializer in reduce

aggregate Method

KTable<Windowed<K>, T> aggregate(
  final Initializer<T> initializer,
  final Aggregator<? super K, ? super V, T> aggregator,
  final Merger<? super K, T> sessionMerger)
KTable<Windowed<K>, VR> aggregate(
  final Initializer<VR> initializer,
  final Aggregator<? super K, ? super V, VR> aggregator,
  final Merger<? super K, VR> sessionMerger,
  final Materialized<K, VR, SessionStore<Bytes, byte[]>> materialized)
Note
aggregate is part of SessionWindowedKStream Contract to…​FIXME.

aggregate…​FIXME

count Method

KTable<Windowed<K>, Long> count()
KTable<Windowed<K>, Long> count(final Materialized<K, Long, SessionStore<Bytes, byte[]>> materialized)
Note
count is part of SessionWindowedKStream Contract to…​FIXME.

count…​FIXME

reduce Method

KTable<Windowed<K>, V> reduce(final Reducer<V> reducer)
KTable<Windowed<K>, V> reduce(
  final Reducer<V> reducer,
  final Materialized<K, V, SessionStore<Bytes, byte[]>> materialized)
Note
reduce is part of SessionWindowedKStream Contract to…​FIXME.

reduce…​FIXME

Creating SessionWindowedKStreamImpl Instance

SessionWindowedKStreamImpl takes the following when created:

SessionWindowedKStreamImpl initializes the internal registries and counters.

doAggregate Internal Method

KTable<Windowed<K>, VR> doAggregate(
  final Initializer<VR> initializer,
  final Aggregator<? super K, ? super V, VR> aggregator,
  final Merger<? super K, VR> merger,
  final Serde<VR> serde)

doAggregate…​FIXME

Note
doAggregate is used when SessionWindowedKStreamImpl is requested to count, aggregate and reduce.

Materializing StoreBuilder (of SessionStores) — materialize Internal Method

StoreBuilder<SessionStore<K, VR>> materialize(
  final MaterializedInternal<K, VR, SessionStore<Bytes, byte[]>> materialized)

materialize…​FIXME

Note
materialize is used exclusively when SessionWindowedKStreamImpl is requested to aggregate.

storeBuilder Internal Method

StoreBuilder<SessionStore<K, VR>> storeBuilder(
  final String storeName,
  final Serde<VR> aggValueSerde)

storeBuilder…​FIXME

Note
storeBuilder is used exclusively when SessionWindowedKStreamImpl is requested to doAggregate (when requested to count, aggregate and reduce).

aggregatorForReducer Internal Method

Aggregator<K, V, V> aggregatorForReducer(final Reducer<V> reducer)

aggregatorForReducer…​FIXME

Note
aggregatorForReducer is used when…​FIXME

mergerForAggregator Internal Method

Merger<K, V> mergerForAggregator(final Aggregator<K, V, V> aggregator)

mergerForAggregator…​FIXME

Note
mergerForAggregator is used when…​FIXME

doCount Internal Method

KTable<Windowed<K>, Long> doCount(final Materialized<K, Long, SessionStore<Bytes, byte[]>> materialized)

doCount…​FIXME

Note
doCount is used exclusively when SessionWindowedKStreamImpl is requested to count.

results matching ""

    No results matching ""