Interface SchedulerListener
-
- All Known Implementing Classes:
AbstractSchedulerListener,SchedulerListeners,StatsRegistryAdapter
public interface SchedulerListenerThe 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSchedulerListener.CandidateEventTypestatic classSchedulerListener.SchedulerEventType
-
Field Summary
Fields Modifier and Type Field Description static SchedulerListenerNOOP
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonCandidateEvent(SchedulerListener.CandidateEventType type)Internal scheduler event.voidonExecutionComplete(ExecutionComplete executionComplete)ExecutionHandlerdone.voidonExecutionDead(Execution execution)Scheduler has detected a dead execution.voidonExecutionFailedHeartbeat(CurrentlyExecuting currentlyExecuting)Scheduler failed to update heartbeat-timestamp for execution that it is currently executing.voidonExecutionScheduled(TaskInstanceId taskInstanceId, Instant executionTime)Execution scheduled either by theSchedulerClientor by aCompletionHandlervoidonExecutionStart(CurrentlyExecuting currentlyExecuting)Execution picked andExecutionHandlerabout to run.voidonSchedulerEvent(SchedulerListener.SchedulerEventType type)Internal scheduler event.
-
-
-
Field Detail
-
NOOP
static final SchedulerListener NOOP
-
-
Method Detail
-
onExecutionScheduled
void onExecutionScheduled(TaskInstanceId taskInstanceId, Instant executionTime)
Execution scheduled either by theSchedulerClientor by aCompletionHandler- Parameters:
taskInstanceId-executionTime-
-
onExecutionStart
void onExecutionStart(CurrentlyExecuting currentlyExecuting)
Execution picked andExecutionHandlerabout to run. Will typically run in the same thread asonExecutionComplete- Parameters:
currentlyExecuting-
-
onExecutionComplete
void onExecutionComplete(ExecutionComplete executionComplete)
ExecutionHandlerdone. Will typically run in the same thread asonExecutionStart- Parameters:
executionComplete-
-
onExecutionDead
void onExecutionDead(Execution execution)
Scheduler has detected a dead execution. About to runDeadExecutionHandler.- 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 itsDeadExecutionHandlertriggered).- 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-
-
-