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
FixedRate
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Generated 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 TypeMethodDescriptionconfig()
If this instance was configured, this would be the config instance used.Deprecated.Update builder from configuration (node of this type).delay()
Deprecated, for removal: This API element is subject to removal in a future version.useinterval()
insteaddelay
(long delay) Deprecated, for removal: This API element is subject to removal in a future version.useinterval()
insteaddelayBy()
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.usedelayBy()
insteadinitialDelay
(long initialDelay) Deprecated, for removal: This API element is subject to removal in a future version.usedelayBy()
insteadinterval()
Fixed interval between each invocation.Fixed interval between each invocation.protected void
Handles providers and decorators.serviceRegistry
(ServiceRegistry registry) Provide an explicit registry instance to use.task()
Task to be scheduled for execution.Task to be scheduled for execution.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 void
Validates required properties.Methods inherited from class io.helidon.scheduling.TaskConfig.BuilderBase
clearId, executor, executor, from, from, id, id, taskManager, taskManager
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
config
in interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends FixedRateConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends FixedRateConfig> - Overrides:
config
in 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:
config
in interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends FixedRateConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends FixedRateConfig> - Overrides:
config
in 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
-
serviceRegistry
Provide an explicit registry instance to use.If not configured, the
GlobalServiceRegistry
would be used to discover services.- Overrides:
serviceRegistry
in classTaskConfig.BuilderBase<BUILDER extends FixedRateConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends FixedRateConfig> - Parameters:
registry
- service registry instance- Returns:
- updated builder instance
-
initialDelay
Deprecated, for removal: This API element is subject to removal in a future version.usedelayBy()
insteadInitial 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.useinterval()
insteadFixed 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:
-
initialDelay
Deprecated, for removal: This API element is subject to removal in a future version.usedelayBy()
insteadInitial delay of the first invocation. Time unit is by defaultTimeUnit.SECONDS
, can be specified withtimeUnit()
.- Returns:
- the initial delay
-
delay
Deprecated, for removal: This API element is subject to removal in a future version.useinterval()
insteadFixed rate delay between each invocation. Time unit is by defaultTimeUnit.SECONDS
, can be specified withtimeUnit(java.util.concurrent.TimeUnit)
.- Returns:
- the delay
-
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:
- the time unit
-
delayBy
Initial delay of the first invocation.- Returns:
- the delay by
-
interval
Fixed interval between each invocation.- Returns:
- the 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:
- the delay type
-
task
Task to be scheduled for execution.- Returns:
- the task
-
config
If this instance was configured, this would be the config instance used.- Overrides:
config
in classTaskConfig.BuilderBase<BUILDER extends FixedRateConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends FixedRateConfig> - Returns:
- config node used to configure this builder, or empty if not configured
-
toString
- Overrides:
toString
in classTaskConfig.BuilderBase<BUILDER extends FixedRateConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends FixedRateConfig>
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators.- Overrides:
preBuildPrototype
in classTaskConfig.BuilderBase<BUILDER extends FixedRateConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends FixedRateConfig>
-
validatePrototype
protected void validatePrototype()Validates required properties.- Overrides:
validatePrototype
in classTaskConfig.BuilderBase<BUILDER extends FixedRateConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends FixedRateConfig>
-
config(io.helidon.config.Config)