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 abstract class ContextualFixedKeyProcessor<KIn,VIn,VOut>
extends Object
implements FixedKeyProcessor<KIn,VIn,VOut>
An abstract implementation of
FixedKeyProcessor that manages the
FixedKeyProcessorContext instance and provides default no-op
implementation of FixedKeyProcessor.close().-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final FixedKeyProcessorContext<KIn,VOut> context()Get the processor's context set duringinitialization.voidinit(FixedKeyProcessorContext<KIn, VOut> context) Initialize this processor with the given context.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.kafka.streams.processor.api.FixedKeyProcessor
close, process
-
Constructor Details
-
ContextualFixedKeyProcessor
protected ContextualFixedKeyProcessor()
-
-
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.- Specified by:
initin interfaceFixedKeyProcessor<KIn,VIn, VOut> - Parameters:
context- the context; may not be null
-
context
Get the processor's context set duringinitialization.- Returns:
- the processor context; null only when called prior to
initialization.
-