Class StoreChangelogReader

    • Constructor Summary

      Constructors 
      Constructor Description
      StoreChangelogReader​(org.apache.kafka.clients.consumer.Consumer<byte[],​byte[]> restoreConsumer, java.time.Duration pollTime, StateRestoreListener userStateRestoreListener, org.apache.kafka.common.utils.LogContext logContext, java.lang.String internalStreamCompacted)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void register​(StateRestorer restorer)
      Register a state store and it's partition for later restoration.
      void reset()  
      java.util.Collection<org.apache.kafka.common.TopicPartition> restore​(RestoringTasks active)
      Restore all registered state stores by reading from their changelogs.
      java.util.Map<org.apache.kafka.common.TopicPartition,​java.lang.Long> restoredOffsets()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StoreChangelogReader

        public StoreChangelogReader​(org.apache.kafka.clients.consumer.Consumer<byte[],​byte[]> restoreConsumer,
                                    java.time.Duration pollTime,
                                    StateRestoreListener userStateRestoreListener,
                                    org.apache.kafka.common.utils.LogContext logContext,
                                    java.lang.String internalStreamCompacted)
    • Method Detail

      • register

        public void register​(StateRestorer restorer)
        Description copied from interface: ChangelogReader
        Register a state store and it's partition for later restoration.
        Specified by:
        register in interface ChangelogReader
        Parameters:
        restorer - the state restorer to register
      • restore

        public java.util.Collection<org.apache.kafka.common.TopicPartition> restore​(RestoringTasks active)
        Description copied from interface: ChangelogReader
        Restore all registered state stores by reading from their changelogs.
        Specified by:
        restore in interface ChangelogReader
        Returns:
        all topic partitions that have been restored
      • restoredOffsets

        public java.util.Map<org.apache.kafka.common.TopicPartition,​java.lang.Long> restoredOffsets()
        Specified by:
        restoredOffsets in interface ChangelogReader
        Returns:
        the restored offsets for all persistent stores.