Class FixedRateConfig.BuilderBase<BUILDER extends FixedRateConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends FixedRateConfig>
java.lang.Object
io.helidon.scheduling.TaskConfig.BuilderBase<BUILDER, PROTOTYPE>
io.helidon.scheduling.FixedRateConfig.BuilderBase<BUILDER, PROTOTYPE>
- Type Parameters:
BUILDER- type of the builder extending this abstract builderPROTOTYPE- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER, PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER, PROTOTYPE>
- Direct Known Subclasses:
FixedRateConfig.Builder
- Enclosing interface:
FixedRateConfig
public abstract static class FixedRateConfig.BuilderBase<BUILDER extends FixedRateConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends FixedRateConfig>
extends TaskConfig.BuilderBase<BUILDER, PROTOTYPE>
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER, PROTOTYPE>
Fluent API builder base for
FixedRateConfig.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations.Nested classes/interfaces inherited from class TaskConfig.BuilderBase
TaskConfig.BuilderBase.TaskConfigImplModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionUpdate builder from configuration (node of this type).delayBy()Initial delay of the first invocation.Initial delay of the first invocation.Configure whether the interval between the invocations should be calculated from the time when previous task started or ended.delayType(FixedRate.DelayType delayType) Configure whether the interval between the invocations should be calculated from the time when previous task started or ended.from(FixedRateConfig prototype) Update this builder from an existing prototype instance.from(FixedRateConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.interval()Fixed interval between each invocation.Fixed interval between each invocation.protected voidHandles providers and decorators.task()Task to be scheduled for execution.Task to be scheduled for execution.toString()protected voidValidates required properties.Methods inherited from class TaskConfig.BuilderBase
clearId, config, enabled, enabled, executor, executor, from, from, id, id, serviceRegistry, serviceRegistry, taskManager, taskManager, taskManagerDiscoverServices, taskManagerDiscoverServicesModifier and TypeMethodDescriptionclearId()Clear existing value of id.config()Configuration used to configure this instance.booleanenabled()Whether the task is enabled.enabled(boolean enabled) Whether the task is enabled.executor()CustomScheduledExecutorServiceused for executing scheduled task.executor(ScheduledExecutorService executor) CustomScheduledExecutorServiceused for executing scheduled task.from(TaskConfig prototype) Update this builder from an existing prototype instance.from(TaskConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.id()Identification of the started task.Identification of the started task.Service registry used to discover providers and services.serviceRegistry(ServiceRegistry serviceRegistry) Service registry used to discover providers and services.Task manager that will manage the created task.taskManager(TaskManager taskManager) Task manager that will manage the created task.booleanService discovery flag forTaskConfig.BuilderBase.taskManager().taskManagerDiscoverServices(boolean taskManagerDiscoverServices) Service discovery flag forTaskConfig.BuilderBase.taskManager().Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Prototype.Builder
buildPrototype, self
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends FixedRateConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends FixedRateConfig>- Overrides:
configin classTaskConfig.BuilderBase<BUILDER extends FixedRateConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends FixedRateConfig>- Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
delayBy
-
interval
-
delayType
Configure whether the interval between the invocations should be calculated from the time when previous task started or ended. Delay type is by defaultFixedRate.DelayType.SINCE_PREVIOUS_START.- Parameters:
delayType- delay type- Returns:
- updated builder instance
- See Also:
-
task
Task to be scheduled for execution.- Parameters:
task- scheduled for execution- Returns:
- updated builder instance
- See Also:
-
delayBy
-
interval
-
delayType
Configure whether the interval between the invocations should be calculated from the time when previous task started or ended. Delay type is by defaultFixedRate.DelayType.SINCE_PREVIOUS_START.- Returns:
- delay type
-
task
Task to be scheduled for execution.- Returns:
- scheduled for execution
-
toString
- Overrides:
toStringin classTaskConfig.BuilderBase<BUILDER extends FixedRateConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends FixedRateConfig>
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators.- Overrides:
preBuildPrototypein classTaskConfig.BuilderBase<BUILDER extends FixedRateConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends FixedRateConfig>
-
validatePrototype
protected void validatePrototype()Validates required properties.- Overrides:
validatePrototypein classTaskConfig.BuilderBase<BUILDER extends FixedRateConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends FixedRateConfig>
-