Interface SchedulerListener

All Known Implementing Classes:
AbstractSchedulerListener, SchedulerListeners, StatsRegistryAdapter

public interface SchedulerListener
The method-parameters might be subject to change. For instance, Event-types might be introduced to hold the data relevant to the event.

Will typically run in the same Thread as the execution, so must not do I/O or similar slow operations.

  • Field Details

  • Method Details

    • onExecutionScheduled

      void onExecutionScheduled(TaskInstanceId taskInstanceId, Instant executionTime)
      Execution scheduled either by the SchedulerClient or by a CompletionHandler
      Parameters:
      taskInstanceId -
      executionTime -
    • onExecutionStart

      void onExecutionStart(CurrentlyExecuting currentlyExecuting)
      Execution picked and ExecutionHandler about to run. Will typically run in the same thread as onExecutionComplete
      Parameters:
      currentlyExecuting -
    • onExecutionComplete

      void onExecutionComplete(ExecutionComplete executionComplete)
      ExecutionHandler done. Will typically run in the same thread as onExecutionStart
      Parameters:
      executionComplete -
    • onExecutionDead

      void onExecutionDead(Execution execution)
      Scheduler has detected a dead execution. About to run DeadExecutionHandler.
      Parameters:
      execution -
    • onExecutionFailedHeartbeat

      void onExecutionFailedHeartbeat(CurrentlyExecuting currentlyExecuting)
      Scheduler failed to update heartbeat-timestamp for execution that it is currently executing. Multiple failures will eventually lead to the execution being declared dead (and its DeadExecutionHandler triggered).
      Parameters:
      currentlyExecuting -
    • onSchedulerEvent

      void onSchedulerEvent(SchedulerListener.SchedulerEventType type)
      Internal scheduler event. Primarily intended for testing.
      Parameters:
      type -
    • onCandidateEvent

      void onCandidateEvent(SchedulerListener.CandidateEventType type)
      Internal scheduler event. Primarily intended for testing.
      Parameters:
      type -