public class IterationTimeBoundedBudget extends Object implements IterationBudget, TimeBudget
IterationBudget,
TimeBoundedBudget| Constructor and Description |
|---|
IterationTimeBoundedBudget(long initialDelay,
long interval,
int maxIterations,
long maxDuration) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canContinue()
Whether the task has budget to continue executing or not
|
Duration |
elapsed()
The amount of time that has elapsed since the budget was created.
|
long |
initialDelay()
Defines an initial delay before running the task
|
long |
interval()
The interval between each task execution
|
int |
iteration()
The current number of iterations
|
long |
maxDuration()
The maximum length of time that the task can execute
|
int |
maxIterations()
The maximum number of iterations
|
boolean |
next()
Move the task to the next iteration
|
public IterationTimeBoundedBudget(long initialDelay,
long interval,
int maxIterations,
long maxDuration)
public long initialDelay()
BudgetinitialDelay in interface Budgetpublic long interval()
Budgetpublic int maxIterations()
IterationBudgetmaxIterations in interface IterationBudgetpublic int iteration()
IterationBudgetiteration in interface IterationBudgetpublic boolean next()
Budgetpublic boolean canContinue()
BudgetcanContinue in interface Budgetpublic long maxDuration()
TimeBudgetmaxDuration in interface TimeBudgetpublic Duration elapsed()
BudgetApache Camel