Interface TaskScheduler


public interface TaskScheduler
Interface representing the task scheduling mechanism for executing recurring telemetry submissions.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Interface representing a scheduled task.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a default single-threaded daemon executor-based scheduler.
    schedule(Runnable task, long initialDelayMs, long periodMs)
    Schedules the task for periodic execution.
    void
    Shuts down the scheduler, terminating any active scheduled task.
  • Method Details

    • defaultScheduler

      static TaskScheduler defaultScheduler()
      Creates a default single-threaded daemon executor-based scheduler.
      Returns:
      the default task scheduler instance
    • schedule

      TaskScheduler.Task schedule(Runnable task, long initialDelayMs, long periodMs)
      Schedules the task for periodic execution.
      Parameters:
      task - the telemetry submission task
      initialDelayMs - the initial delay in milliseconds before the first execution
      periodMs - the period between consecutive executions in milliseconds
      Returns:
      the scheduled task instance
    • shutdown

      void shutdown()
      Shuts down the scheduler, terminating any active scheduled task.