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 IterationTimeBoundedBudget
build()
Build the budgetIterationTimeBoundedBudgetBuilder
withInitialDelay(Duration duration)
IterationTimeBoundedBudgetBuilder
withInterval(Duration duration)
IterationTimeBoundedBudgetBuilder
withMaxDuration(Duration duration)
IterationTimeBoundedBudgetBuilder
withMaxIterations(int maxIterations)
IterationTimeBoundedBudgetBuilder
withUnlimitedDuration()
-
-
-
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:BudgetBuilder
Build the budget- Specified by:
build
in interfaceBudgetBuilder<IterationTimeBoundedBudget>
- Returns:
- the budget that was built
-
-