Class AbstractProcessor<K,V>

Type Parameters:
K - the type of keys
V - the type of values
All Implemented Interfaces:

@Deprecated public abstract class AbstractProcessor<K,V> extends Object implements Processor<K,V>
Since 3.0. Use Processor or ContextualProcessor instead.
An abstract implementation of Processor that manages the ProcessorContext instance and provides default no-op implementation of close().
  • Field Details

  • Constructor Details

    • AbstractProcessor

      protected AbstractProcessor()
  • Method Details

    • init

      public void init(ProcessorContext context)
      Description copied from interface: Processor
      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, Processor.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 meta data, to schedule a method to be called periodically and to access attached StateStores.

      Specified by:
      init in interface Processor<K,V>
      context - the context; may not be null
    • close

      public void close()
      Close this processor and clean up any resources.

      This method does nothing by default; if desired, subclasses should override it with custom functionality.

      Specified by:
      close in interface Processor<K,V>
    • context

      protected final ProcessorContext context()
      Get the processor's context set during initialization.
      the processor context; null only when called prior to initialization.