Class ContextualFixedKeyProcessor<KIn,VIn,VOut>

java.lang.Object
org.apache.kafka.streams.processor.api.ContextualFixedKeyProcessor<KIn,VIn,VOut>
Type Parameters:
KIn - the type of input keys
VIn - the type of input values
VOut - the type of output values
All Implemented Interfaces:
FixedKeyProcessor<KIn,VIn,VOut>

@Public public abstract class ContextualFixedKeyProcessor<KIn,VIn,VOut> extends Object implements FixedKeyProcessor<KIn,VIn,VOut>
An abstract implementation of FixedKeyProcessor that manages the FixedKeyProcessorContext instance.
  • Method Details

    • init

      public void init(FixedKeyProcessorContext<KIn,VOut> context)
      Description copied from interface: FixedKeyProcessor
      Initialize this processor with the given context. The framework ensures this is called once per processor when the topology that contains it is initialized. When the framework is done with the processor, FixedKeyProcessor.close() will be called on it; the framework may later re-use the processor by calling #init() again.

      The provided context can be used to access topology and record metadata, to schedule a method to be called periodically and to access attached StateStores.

      State stores attached to this processor are fully restored from their changelog topics before init() is called. However, for stores that report approximate sizes (notably the default RocksDB-backed stores), size estimates such as ReadOnlyKeyValueStore.approximateNumEntries() may not yet reflect post-compaction counts at this point and can include duplicate writes and tombstones replayed during restoration; see that method's Javadoc for details.

      Specified by:
      init in interface FixedKeyProcessor<KIn,VIn,VOut>
      Parameters:
      context - the context; may not be null