Interface Task

    • Method Detail

      • needsInitializationOrRestoration

        default boolean needsInitializationOrRestoration()
      • isActive

        boolean isActive()
      • isClosed

        boolean isClosed()
      • initializeIfNeeded

        void initializeIfNeeded()
        Throws:
        LockException - could happen when multi-threads within the single instance, could retry
        StreamsException - fatal error, should close the thread
      • completeRestoration

        void completeRestoration()
        Throws:
        StreamsException - fatal error, should close the thread
      • commitNeeded

        boolean commitNeeded()
      • postCommit

        void postCommit()
      • suspend

        void suspend()
      • resume

        void resume()
        Throws:
        StreamsException - fatal error, should close the thread
      • closeClean

        void closeClean()
        Must be idempotent.
      • closeDirty

        void closeDirty()
        Must be idempotent.
      • closeCleanAndRecycleState

        void closeCleanAndRecycleState()
        Attempt a clean close but do not close the underlying state
      • revive

        void revive()
        Revive a closed task to a created one; should never throw an exception
      • changelogPartitions

        Collection<TopicPartition> changelogPartitions()
        Returns:
        any changelog partitions associated with this task
      • changelogOffsets

        Map<TopicPartition,​Long> changelogOffsets()
        Returns:
        the offsets of all the changelog partitions associated with this task, indicating the current positions of the logged state stores of the task.
      • recordProcessBatchTime

        default void recordProcessBatchTime​(long processBatchTime)
      • recordProcessTimeRatioAndBufferSize

        default void recordProcessTimeRatioAndBufferSize​(long allTaskProcessMs,
                                                         long now)
      • process

        default boolean process​(long wallClockTime)
      • commitRequested

        default boolean commitRequested()
      • maybePunctuateStreamTime

        default boolean maybePunctuateStreamTime()
      • maybePunctuateSystemTime

        default boolean maybePunctuateSystemTime()