Class AbstractNotifyingRestoreCallback

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onBatchRestored​(org.apache.kafka.common.TopicPartition topicPartition, java.lang.String storeName, long batchEndOffset, long numRestored)
      Method called after restoring a batch of records.
      void onRestoreEnd​(org.apache.kafka.common.TopicPartition topicPartition, java.lang.String storeName, long totalRestored)
      Method called when restoring the StateStore is complete.
      void onRestoreStart​(org.apache.kafka.common.TopicPartition topicPartition, java.lang.String storeName, long startingOffset, long endingOffset)
      Method called at the very beginning of StateStore restoration.
      • Methods inherited from class java.lang.Object

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

      • AbstractNotifyingRestoreCallback

        public AbstractNotifyingRestoreCallback()
    • Method Detail

      • onBatchRestored

        public void onBatchRestored​(org.apache.kafka.common.TopicPartition topicPartition,
                                    java.lang.String storeName,
                                    long batchEndOffset,
                                    long numRestored)
        Description copied from interface: StateRestoreListener
        Method called after restoring a batch of records. In this case the maximum size of the batch is whatever the value of the MAX_POLL_RECORDS is set to. This method is called after restoring each batch and it is advised to keep processing to a minimum. Any heavy processing will hold up recovering the next batch, hence slowing down the restore process as a whole. If you need to do any extended processing or connecting to an external service consider doing so asynchronously.
        Specified by:
        onBatchRestored in interface StateRestoreListener
        Parameters:
        topicPartition - the TopicPartition containing the values to restore
        storeName - the name of the store undergoing restoration
        batchEndOffset - the inclusive ending offset for the current restored batch for this TopicPartition
        numRestored - the total number of records restored in this batch for this TopicPartition
        See Also:
        This method does nothing by default; if desired, subclasses should override it with custom functionality.