Interface ThreadStateProcessor

All Known Subinterfaces:
BatchInterceptor<K,V>, ConsumerAwareRecordInterceptor<K,V>, RecordInterceptor<K,V>
All Known Implementing Classes:
CompositeBatchInterceptor, CompositeRecordInterceptor

public interface ThreadStateProcessor
A general interface for managing thread-bound resources when a Consumer is available.
Since:
2.8
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    clearThreadState(org.apache.kafka.clients.consumer.Consumer<?,?> consumer)
    Call to clear thread-bound resources which were set up in setupThreadState(Consumer).
    default void
    setupThreadState(org.apache.kafka.clients.consumer.Consumer<?,?> consumer)
    Call to set up thread-bound resources which will be available for the entire duration of enclosed operation involving a Consumer.
  • Method Details

    • setupThreadState

      default void setupThreadState(org.apache.kafka.clients.consumer.Consumer<?,?> consumer)
      Call to set up thread-bound resources which will be available for the entire duration of enclosed operation involving a Consumer.
      Parameters:
      consumer - the consumer.
    • clearThreadState

      default void clearThreadState(org.apache.kafka.clients.consumer.Consumer<?,?> consumer)
      Call to clear thread-bound resources which were set up in setupThreadState(Consumer).
      Parameters:
      consumer - the consumer.