Interface Processor<K,V>

Type Parameters:
K - the type of keys
V - the type of values
All Known Implementing Classes:
AbstractProcessor

@Deprecated public interface Processor<K,V>
Deprecated.
Since 3.0. Use Processor instead.
A processor of key-value pair records.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated.
    Close this processor and clean up any resources.
    void
    Deprecated.
    Initialize this processor with the given context.
    void
    process(K key, V value)
    Deprecated.
    Process the record with the given key and value.
  • Method Details

    • init

      void init(ProcessorContext context)
      Deprecated.
      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, 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.

      Parameters:
      context - the context; may not be null
    • process

      void process(K key, V value)
      Deprecated.
      Process the record with the given key and value.
      Parameters:
      key - the key for the record
      value - the value for the record
    • close

      void close()
      Deprecated.
      Close this processor and clean up any resources. Be aware that #close() is called after an internal cleanup. Thus, it is not possible to write anything to Kafka as underlying clients are already closed. The framework may later re-use this processor by calling #init() on it again.

      Note: Do not close any streams managed resources, like StateStores here, as they are managed by the library.