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 aConsumer
is available.- Since:
- 2.8
- Author:
- Karol Dowbecki, Gary Russell
-
-
Method Summary
All Methods Instance Methods Default Methods 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 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 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.
-
-