Interface FixedRate

All Superinterfaces:
RuntimeType.Api<FixedRateConfig>, Task

public interface FixedRate extends 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();
 
  • 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