void writeToTopology(
InternalTopologyBuilder topologyBuilder)
StatefulProcessorNode
StatefulProcessorNode is a concrete StreamsGraphNode (as a ProcessorGraphNode) that represents stateful operators of the following:
StatefulProcessorNode is created when:
-
KStreamImplis requested to KStreamImpl.transform and KStreamImpl.flatTransform, KStreamImpl.transformValues, KStreamImpl.flatTransformValues, KStreamImpl.process -
GroupedStreamAggregateBuilderis requested to build (for KStream.groupBy and KStream.groupByKey streaming operators, incl.windowedByoperator with a Windows or a SessionWindows) -
KGroupedTableImplis requested to doAggregate (for KGroupedTableImpl.aggregate, KGroupedTableImpl.count, and KGroupedTableImpl.reduce operators) -
KTableImplis requested to suppress
StatefulProcessorNode extends the parent ProcessorGraphNode with the two state-related parameters - the state store names and a StoreBuilder.
Creating StatefulProcessorNode Instance
StatefulProcessorNode takes the following to be created:
-
Names of the state stores or a StoreBuilder
writeToTopology Method
|
Note
|
writeToTopology is part of the StreamsGraphNode Contract to…FIXME.
|
writeToTopology requests the given InternalTopologyBuilder to add a processor (with the name and the ProcessorSupplier as defined by the ProcessorParameters).
With state store names given, writeToTopology requests the given InternalTopologyBuilder to connect them with the processor.
With a StoreBuilder given, writeToTopology requests the given InternalTopologyBuilder to add a state store (with the StoreBuilder and the processor).