Module io.helidon.scheduling
Package io.helidon.scheduling
Class FixedRateConfig.BuilderBase.FixedRateConfigImpl
java.lang.Object
io.helidon.scheduling.TaskConfig.BuilderBase.TaskConfigImpl
io.helidon.scheduling.FixedRateConfig.BuilderBase.FixedRateConfigImpl
- All Implemented Interfaces:
Prototype.Api
,Prototype.Factory<FixedRate>
,FixedRateConfig
,TaskConfig
,Supplier<FixedRate>
- Enclosing class:
FixedRateConfig.BuilderBase<BUILDER extends FixedRateConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends FixedRateConfig>
protected static class FixedRateConfig.BuilderBase.FixedRateConfigImpl
extends TaskConfig.BuilderBase.TaskConfigImpl
implements FixedRateConfig, Supplier<FixedRate>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.scheduling.FixedRateConfig
FixedRateConfig.Builder, FixedRateConfig.BuilderBase<BUILDER extends FixedRateConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends FixedRateConfig> Nested classes/interfaces inherited from interface io.helidon.scheduling.TaskConfig
TaskConfig.Builder, TaskConfig.BuilderBase<BUILDER extends TaskConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends TaskConfig> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
FixedRateConfigImpl
(FixedRateConfig.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create a new instance of the runtime type from this config object.long
delay()
Fixed rate delay between each invocation.delayBy()
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.boolean
get()
int
hashCode()
long
Initial delay of the first invocation.interval()
Fixed interval between each invocation.task()
Task to be scheduled for execution.timeUnit()
TimeUnit
used for interpretation of values provided withFixedRateConfig.BuilderBase.delay(long)
andFixedRateConfig.BuilderBase.initialDelay(long)
.toString()
Methods inherited from class io.helidon.scheduling.TaskConfig.BuilderBase.TaskConfigImpl
executor, id, taskManager
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.scheduling.TaskConfig
executor, id, taskManager
-
Constructor Details
-
FixedRateConfigImpl
Create an instance providing a builder.- Parameters:
builder
- extending builder base of this prototype
-
-
Method Details
-
build
Description copied from interface:Prototype.Factory
Create a new instance of the runtime type from this config object.- Specified by:
build
in interfacePrototype.Factory<FixedRate>
- Returns:
- new configured runtime instance
-
get
-
initialDelay
public long initialDelay()Description copied from interface:FixedRateConfig
Initial delay of the first invocation. Time unit is by defaultTimeUnit.SECONDS
, can be specified withtimeUnit()
.- Specified by:
initialDelay
in interfaceFixedRateConfig
- Returns:
- initial delay value
-
delay
public long delay()Description copied from interface:FixedRateConfig
Fixed rate delay between each invocation. Time unit is by defaultTimeUnit.SECONDS
, can be specified withFixedRateConfig.BuilderBase.timeUnit(java.util.concurrent.TimeUnit)
.- Specified by:
delay
in interfaceFixedRateConfig
- Returns:
- delay between each invocation
-
timeUnit
Description copied from interface:FixedRateConfig
TimeUnit
used for interpretation of values provided withFixedRateConfig.BuilderBase.delay(long)
andFixedRateConfig.BuilderBase.initialDelay(long)
.- Specified by:
timeUnit
in interfaceFixedRateConfig
- Returns:
- time unit for interpreting values
in
FixedRateConfig.BuilderBase.delay(long)
andFixedRateConfig.BuilderBase.initialDelay(long)
-
delayBy
Description copied from interface:FixedRateConfig
Initial delay of the first invocation.- Specified by:
delayBy
in interfaceFixedRateConfig
- Returns:
- initial delay duration
-
interval
Description copied from interface:FixedRateConfig
Fixed interval between each invocation.- Specified by:
interval
in interfaceFixedRateConfig
- Returns:
- interval between each invocation
-
delayType
Description copied from interface:FixedRateConfig
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
.- Specified by:
delayType
in interfaceFixedRateConfig
- Returns:
- delay type
-
task
Description copied from interface:FixedRateConfig
Task to be scheduled for execution.- Specified by:
task
in interfaceFixedRateConfig
- Returns:
- scheduled for execution
-
toString
- Overrides:
toString
in classTaskConfig.BuilderBase.TaskConfigImpl
-
equals
- Overrides:
equals
in classTaskConfig.BuilderBase.TaskConfigImpl
-
hashCode
public int hashCode()- Overrides:
hashCode
in classTaskConfig.BuilderBase.TaskConfigImpl
-