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 BackOffStrategybackOffStrategyprotected longinitialDelayprotected longintervalprotected intmaxIterations
-
Constructor Summary
Constructors Constructor Description IterationBoundedBudgetBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IterationBoundedBudgetbuild()Build the budgetIterationBoundedBudgetBuilderwithBackOffStrategy(BackOffStrategy backOffStrategy)IterationBoundedBudgetBuilderwithInitialDelay(Duration duration)IterationBoundedBudgetBuilderwithInterval(Duration duration)IterationBoundedBudgetBuilderwithMaxIterations(int maxIterations)
-
-
-
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)
-
withBackOffStrategy
public IterationBoundedBudgetBuilder withBackOffStrategy(BackOffStrategy backOffStrategy)
-
build
public IterationBoundedBudget build()
Description copied from interface:BudgetBuilderBuild the budget- Specified by:
buildin interfaceBudgetBuilder<IterationBudget>- Returns:
- the budget that was built
-
-