Interface ThreadStateProcessor
-
- All Known Subinterfaces:
BatchInterceptor<K,V>,ConsumerAwareRecordInterceptor<K,V>,RecordInterceptor<K,V>
- All Known Implementing Classes:
CompositeBatchInterceptor,CompositeRecordInterceptor
public interface ThreadStateProcessorA general interface for managing thread-bound resources when aConsumeris available.- Since:
- 2.8
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidclearThreadState(org.apache.kafka.clients.consumer.Consumer<?,?> consumer)Call to clear thread-bound resources which were set up insetupThreadState(Consumer).default voidsetupThreadState(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 aConsumer.
-
-
-
Method Detail
-
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 aConsumer.- 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 insetupThreadState(Consumer).- Parameters:
consumer- the consumer.
-
-