Module io.helidon.scheduling
Package io.helidon.scheduling
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> 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 io.helidon.scheduling.TaskConfig.BuilderBase
TaskConfig.BuilderBase.TaskConfigImpl -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Update builder from configuration (node of this type).delay()Deprecated, for removal: This API element is subject to removal in a future version.This option is deprecated, useintervalinsteaddelay(long delay) Deprecated, for removal: This API element is subject to removal in a future version.This option is deprecated, useintervalinsteaddelayBy()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.Deprecated, for removal: This API element is subject to removal in a future version.This option is deprecated, usedelayByinsteadinitialDelay(long initialDelay) Deprecated, for removal: This API element is subject to removal in a future version.This option is deprecated, usedelayByinsteadinterval()Fixed interval between each invocation.Fixed interval between each invocation.protected voidHandles providers and decorators.Service registry used to discover providers and services.serviceRegistry(ServiceRegistry serviceRegistry) Service registry used to discover providers and services.task()Task to be scheduled for execution.Task to be scheduled for execution.booleanService discovery flag forTaskConfig.BuilderBase.taskManager().taskManagerDiscoverServices(boolean taskManagerDiscoverServices) Service discovery flag forTaskConfig.BuilderBase.taskManager().timeUnit()Deprecated, for removal: This API element is subject to removal in a future version.as duration is used for new options, this option is not neededDeprecated, for removal: This API element is subject to removal in a future version.as duration is used for new options, this option is not neededtoString()protected voidValidates required properties.Methods inherited from class io.helidon.scheduling.TaskConfig.BuilderBase
clearId, config, enabled, enabled, executor, executor, from, from, id, id, taskManager, taskManagerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.builder.api.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
Deprecated.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
-
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
-
initialDelay
Deprecated, for removal: This API element is subject to removal in a future version.This option is deprecated, usedelayByinsteadInitial delay of the first invocation. Time unit is by defaultTimeUnit.SECONDS, can be specified withtimeUnit().- Parameters:
initialDelay- initial delay value- Returns:
- updated builder instance
- See Also:
-
delay
Deprecated, for removal: This API element is subject to removal in a future version.This option is deprecated, useintervalinsteadFixed rate delay between each invocation. Time unit is by defaultTimeUnit.SECONDS, can be specified withtimeUnit(java.util.concurrent.TimeUnit).- Parameters:
delay- delay between each invocation- Returns:
- updated builder instance
- See Also:
-
timeUnit
Deprecated, for removal: This API element is subject to removal in a future version.as duration is used for new options, this option is not needed- Parameters:
timeUnit- time unit for interpreting values indelay(long)andinitialDelay(long)- Returns:
- updated builder instance
- See Also:
-
delayBy
Initial delay of the first invocation.- Parameters:
delayBy- initial delay duration- Returns:
- updated builder instance
- See Also:
-
interval
Fixed interval between each invocation.- Parameters:
interval- interval between each invocation- Returns:
- updated builder instance
- See Also:
-
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:
-
taskManagerDiscoverServices
Service discovery flag forTaskConfig.BuilderBase.taskManager(). If set totrue, services will be discovered from Java service loader, or Helidon ServiceRegistry.- Overrides:
taskManagerDiscoverServicesin classTaskConfig.BuilderBase<BUILDER extends FixedRateConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends FixedRateConfig> - Parameters:
taskManagerDiscoverServices- whether to enable automatic service discovery- Returns:
- updated builder instance
- See Also:
-
serviceRegistry
Service registry used to discover providers and services. Provide an explicit registry instance to use.If not configured, the
GlobalServiceRegistrywould be used to discover services.- Overrides:
serviceRegistryin classTaskConfig.BuilderBase<BUILDER extends FixedRateConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends FixedRateConfig> - Parameters:
serviceRegistry- service registry to use- Returns:
- updated builder instance
- See Also:
-
initialDelay
Deprecated, for removal: This API element is subject to removal in a future version.This option is deprecated, usedelayByinsteadInitial delay of the first invocation. Time unit is by defaultTimeUnit.SECONDS, can be specified withtimeUnit().- Returns:
- initial delay value
-
delay
Deprecated, for removal: This API element is subject to removal in a future version.This option is deprecated, useintervalinsteadFixed rate delay between each invocation. Time unit is by defaultTimeUnit.SECONDS, can be specified withtimeUnit(java.util.concurrent.TimeUnit).- Returns:
- delay between each invocation
-
timeUnit
Deprecated, for removal: This API element is subject to removal in a future version.as duration is used for new options, this option is not needed- Returns:
- time unit for interpreting values
in
delay(long)andinitialDelay(long)
-
delayBy
Initial delay of the first invocation.- Returns:
- initial delay duration
-
interval
Fixed interval between each invocation.- Returns:
- interval between each invocation
-
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
-
taskManagerDiscoverServices
public boolean taskManagerDiscoverServices()Service discovery flag forTaskConfig.BuilderBase.taskManager(). If set totrue, services will be discovered from Java service loader, or Helidon ServiceRegistry.- Overrides:
taskManagerDiscoverServicesin classTaskConfig.BuilderBase<BUILDER extends FixedRateConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends FixedRateConfig> - Returns:
- whether to enable automatic service discovery
-
serviceRegistry
Service registry used to discover providers and services. Provide an explicit registry instance to use.If not configured, the
GlobalServiceRegistrywould be used to discover services.- Overrides:
serviceRegistryin classTaskConfig.BuilderBase<BUILDER extends FixedRateConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends FixedRateConfig> - Returns:
- service registry to use
-
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>
-
config(io.helidon.config.Config)