Class IterationTimeBoundedBudgetBuilder
- java.lang.Object
-
- org.apache.camel.support.task.budget.IterationTimeBoundedBudgetBuilder
-
- All Implemented Interfaces:
BudgetBuilder<IterationTimeBoundedBudget>
public class IterationTimeBoundedBudgetBuilder extends Object implements BudgetBuilder<IterationTimeBoundedBudget>
A helper builder of iteration and time 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 and a duration of 5 seconds.
-
-
Constructor Summary
Constructors Constructor Description IterationTimeBoundedBudgetBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IterationTimeBoundedBudgetbuild()Build the budgetIterationTimeBoundedBudgetBuilderwithInitialDelay(Duration duration)IterationTimeBoundedBudgetBuilderwithInterval(Duration duration)IterationTimeBoundedBudgetBuilderwithMaxDuration(Duration duration)IterationTimeBoundedBudgetBuilderwithMaxIterations(int maxIterations)IterationTimeBoundedBudgetBuilderwithUnlimitedDuration()
-
-
-
Method Detail
-
withInitialDelay
public IterationTimeBoundedBudgetBuilder withInitialDelay(Duration duration)
-
withInterval
public IterationTimeBoundedBudgetBuilder withInterval(Duration duration)
-
withMaxIterations
public IterationTimeBoundedBudgetBuilder withMaxIterations(int maxIterations)
-
withMaxDuration
public IterationTimeBoundedBudgetBuilder withMaxDuration(Duration duration)
-
withUnlimitedDuration
public IterationTimeBoundedBudgetBuilder withUnlimitedDuration()
-
build
public IterationTimeBoundedBudget build()
Description copied from interface:BudgetBuilderBuild the budget- Specified by:
buildin interfaceBudgetBuilder<IterationTimeBoundedBudget>- Returns:
- the budget that was built
-
-