Interface FixedRate

All Superinterfaces:
io.helidon.builder.api.RuntimeType.Api<FixedRateConfig>, Task

public interface FixedRate extends io.helidon.builder.api.RuntimeType.Api<FixedRateConfig>, Task
Scheduling periodically executed task with specified fixed rate.

 Scheduling.fixedRate()
      .delay(2)
      .task(inv -> System.out.println("Executed every 2 seconds"))
      .build();
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Whether the delay should be calculated from the start or end of the previous task.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    Create a new fluent API builder to build a fixed rate task.
    static FixedRate
    Create a fixed rate task from programmatic configuration.
    static FixedRate
    Create a fixed rate task from configuration.

    Methods inherited from interface io.helidon.builder.api.RuntimeType.Api

    prototype

    Methods inherited from interface io.helidon.scheduling.Task

    description, executor
  • Method Details

    • builder

      static FixedRateConfig.Builder builder()
      Create a new fluent API builder to build a fixed rate task.
      Returns:
      a builder instance
    • create

      static FixedRate create(Consumer<FixedRateConfig.Builder> configConsumer)
      Create a fixed rate task from configuration.
      Parameters:
      configConsumer - config consumer
      Returns:
      a new fixed rate task configured from config
    • create

      static FixedRate create(FixedRateConfig config)
      Create a fixed rate task from programmatic configuration.
      Parameters:
      config - configuration
      Returns:
      a new fixed rate task