Class CompositeStateRestoreListener
- java.lang.Object
-
- io.streamthoughts.azkarra.api.streams.listener.CompositeStateRestoreListener
-
- All Implemented Interfaces:
KafkaStreamsContainerAware
,org.apache.kafka.streams.processor.StateRestoreListener
public class CompositeStateRestoreListener extends Object implements org.apache.kafka.streams.processor.StateRestoreListener, KafkaStreamsContainerAware
AStateRestoreListener
that delegates to one or moreStateRestoreListener
in order.
-
-
Constructor Summary
Constructors Constructor Description CompositeStateRestoreListener(Collection<org.apache.kafka.streams.processor.StateRestoreListener> listeners)
Creates a newCompositeStateRestoreListener
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(org.apache.kafka.streams.processor.StateRestoreListener listener)
void
onBatchRestored(org.apache.kafka.common.TopicPartition topicPartition, String storeName, long batchEndOffset, long numRestored)
void
onRestoreEnd(org.apache.kafka.common.TopicPartition topicPartition, String storeName, long totalRestored)
void
onRestoreStart(org.apache.kafka.common.TopicPartition topicPartition, String storeName, long startingOffset, long endingOffset)
void
setKafkaStreamsContainer(KafkaStreamsContainer container)
Sets the KafkaStreamsContainer that this object runs in.
-
-
-
Constructor Detail
-
CompositeStateRestoreListener
public CompositeStateRestoreListener(Collection<org.apache.kafka.streams.processor.StateRestoreListener> listeners)
Creates a newCompositeStateRestoreListener
instance.- Parameters:
listeners
- the list ofStateRestoreListener
.
-
-
Method Detail
-
addListener
public void addListener(org.apache.kafka.streams.processor.StateRestoreListener listener)
-
onRestoreStart
public void onRestoreStart(org.apache.kafka.common.TopicPartition topicPartition, String storeName, long startingOffset, long endingOffset)
- Specified by:
onRestoreStart
in interfaceorg.apache.kafka.streams.processor.StateRestoreListener
-
onBatchRestored
public void onBatchRestored(org.apache.kafka.common.TopicPartition topicPartition, String storeName, long batchEndOffset, long numRestored)
- Specified by:
onBatchRestored
in interfaceorg.apache.kafka.streams.processor.StateRestoreListener
-
onRestoreEnd
public void onRestoreEnd(org.apache.kafka.common.TopicPartition topicPartition, String storeName, long totalRestored)
- Specified by:
onRestoreEnd
in interfaceorg.apache.kafka.streams.processor.StateRestoreListener
-
setKafkaStreamsContainer
public void setKafkaStreamsContainer(KafkaStreamsContainer container)
Sets the KafkaStreamsContainer that this object runs in.- Specified by:
setKafkaStreamsContainer
in interfaceKafkaStreamsContainerAware
- Parameters:
container
- theKafkaStreamsContainer
.
-
-