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 TypeMethodDescriptiondefault void
clearThreadState
(org.apache.kafka.clients.consumer.Consumer<?, ?> consumer) Call to clear thread-bound resources which were set up insetupThreadState(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 aConsumer
.
-
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 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.
-