Interface AbstractSourceTask.BackoffConfig
- Enclosing class:
- AbstractSourceTask
public static interface AbstractSourceTask.BackoffConfig
An interface to define the Backoff configuration. Used for convenience with Timer.
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Gets the abort timer rule flag.The AbortTrigger that will abort the timer.Gets Supplier that will return the number of milliseconds remaining in the timer.
-
Method Details
-
getSupplierOfTimeRemaining
AbstractSourceTask.SupplierOfLong getSupplierOfTimeRemaining()Gets Supplier that will return the number of milliseconds remaining in the timer. Should be the maximum delay for situations that do not use a timer.- Returns:
- A supplier of the number of milliseconds until the timer expires.
-
getAbortTrigger
AbstractSourceTask.AbortTrigger getAbortTrigger()The AbortTrigger that will abort the timer.- Returns:
- the AbortTrigger.
-
applyTimerRule
default boolean applyTimerRule()Gets the abort timer rule flag. If there is no timer that may expire and shorten the time for the delay then this value should befalse
otherwise if the delay time will exceed the maximum time remaining no delay is executed. By default, the false istrue
.- Returns:
- The abort time rule flag.
-