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 keysVIn- the type of input valuesVOut- 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 Summary
Modifier and TypeMethodDescriptionvoidinit(FixedKeyProcessorContext<KIn, VOut> context) Initialize this processor with the given context.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FixedKeyProcessor
close, process
-
Method Details
-
init
Description copied from interface:FixedKeyProcessorInitialize 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
contextcan be used to access topology and record metadata, toschedulea method to becalled periodicallyand to access attachedStateStores.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 asReadOnlyKeyValueStore.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:
initin interfaceFixedKeyProcessor<KIn,VIn, VOut> - Parameters:
context- the context; may not be null
-