Class IterationBoundedBudgetBuilder
- java.lang.Object
-
- org.apache.camel.support.task.budget.IterationBoundedBudgetBuilder
-
- All Implemented Interfaces:
BudgetBuilder<IterationBudget>
public class IterationBoundedBudgetBuilder extends Object implements BudgetBuilder<IterationBudget>
A helper builder of iteration bounded builders. Provide generic/safe default values, but should be adjusted on a per-case basis. By default, execute the iterations for up to Integer.MAX_VALUE.
-
-
Field Summary
Fields Modifier and Type Field Description protected BackOffStrategy
backOffStrategy
protected long
initialDelay
protected long
interval
protected int
maxIterations
-
Constructor Summary
Constructors Constructor Description IterationBoundedBudgetBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IterationBoundedBudget
build()
Build the budgetIterationBoundedBudgetBuilder
withBackOffStrategy(BackOffStrategy backOffStrategy)
IterationBoundedBudgetBuilder
withInitialDelay(Duration duration)
IterationBoundedBudgetBuilder
withInterval(Duration duration)
IterationBoundedBudgetBuilder
withMaxIterations(int maxIterations)
IterationBoundedBudgetBuilder
withUnlimitedMaxIterations()
-
-
-
Field Detail
-
initialDelay
protected long initialDelay
-
interval
protected long interval
-
maxIterations
protected int maxIterations
-
backOffStrategy
protected BackOffStrategy backOffStrategy
-
-
Method Detail
-
withInitialDelay
public IterationBoundedBudgetBuilder withInitialDelay(Duration duration)
-
withInterval
public IterationBoundedBudgetBuilder withInterval(Duration duration)
-
withMaxIterations
public IterationBoundedBudgetBuilder withMaxIterations(int maxIterations)
-
withUnlimitedMaxIterations
public IterationBoundedBudgetBuilder withUnlimitedMaxIterations()
-
withBackOffStrategy
public IterationBoundedBudgetBuilder withBackOffStrategy(BackOffStrategy backOffStrategy)
-
build
public IterationBoundedBudget build()
Description copied from interface:BudgetBuilder
Build the budget- Specified by:
build
in interfaceBudgetBuilder<IterationBudget>
- Returns:
- the budget that was built
-
-