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> Prototype.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 Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
FixedRate
.-
Nested Class Summary
Modifier 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
-
Method Summary
Modifier and TypeMethodDescriptionconfig()
If this instance was configured, this would be the config instance used.Update builder from configuration (node of this type).delay()
Fixed rate delay between each invocation.delay
(long delay) Fixed rate delay between each invocation.Configure whether the delay between the invocations should be calculated from the time when previous task started or ended.delayType
(FixedRate.DelayType delayType) Configure whether the delay 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.long
Initial delay of the first invocation.initialDelay
(long initialDelay) Initial delay of the first invocation.protected void
Handles providers and decorators.task()
Task to be scheduled for execution.Task to be scheduled for execution.timeUnit()
toString()
protected void
Validates required properties.Methods inherited from class io.helidon.scheduling.TaskConfig.BuilderBase
executor, executor, from, from
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
Methods inherited from interface io.helidon.builder.api.Prototype.ConfiguredBuilder
discoverService, discoverServices
-
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:
config
in interfacePrototype.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
-
initialDelay
Initial 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
Fixed 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:
-
delayType
Configure whether the delay 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:
-
timeUnit
- Parameters:
timeUnit
- time unit for interpreting values indelay(long)
andinitialDelay(long)
- Returns:
- updated builder instance
- See Also:
-
initialDelay
public long initialDelay()Initial delay of the first invocation. Time unit is by defaultTimeUnit.SECONDS
, can be specified withtimeUnit()
.- Returns:
- the initial delay
-
delay
Fixed rate delay between each invocation. Time unit is by defaultTimeUnit.SECONDS
, can be specified withtimeUnit(java.util.concurrent.TimeUnit)
.- Returns:
- the delay
-
delayType
Configure whether the delay 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
-
timeUnit
- Returns:
- the time unit
-
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>
-