Class StatsRegistryAdapter
- java.lang.Object
-
- com.github.kagkarlsson.scheduler.stats.StatsRegistryAdapter
-
- All Implemented Interfaces:
SchedulerListener
public class StatsRegistryAdapter extends Object implements SchedulerListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.github.kagkarlsson.scheduler.event.SchedulerListener
SchedulerListener.CandidateEventType, SchedulerListener.SchedulerEventType
-
-
Field Summary
-
Fields inherited from interface com.github.kagkarlsson.scheduler.event.SchedulerListener
NOOP
-
-
Constructor Summary
Constructors Constructor Description StatsRegistryAdapter(StatsRegistry statsRegistry)
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Constructor Detail
-
StatsRegistryAdapter
public StatsRegistryAdapter(StatsRegistry statsRegistry)
-
-
Method Detail
-
onExecutionScheduled
public void onExecutionScheduled(TaskInstanceId taskInstanceId, Instant executionTime)
Description copied from interface:SchedulerListenerExecution scheduled either by theSchedulerClientor by aCompletionHandler- Specified by:
onExecutionScheduledin interfaceSchedulerListener
-
onExecutionStart
public void onExecutionStart(CurrentlyExecuting currentlyExecuting)
Description copied from interface:SchedulerListenerExecution picked andExecutionHandlerabout to run. Will typically run in the same thread asonExecutionComplete- Specified by:
onExecutionStartin interfaceSchedulerListener
-
onExecutionComplete
public void onExecutionComplete(ExecutionComplete executionComplete)
Description copied from interface:SchedulerListenerExecutionHandlerdone. Will typically run in the same thread asonExecutionStart- Specified by:
onExecutionCompletein interfaceSchedulerListener
-
onExecutionDead
public void onExecutionDead(Execution execution)
Description copied from interface:SchedulerListenerScheduler has detected a dead execution. About to runDeadExecutionHandler.- Specified by:
onExecutionDeadin interfaceSchedulerListener
-
onExecutionFailedHeartbeat
public void onExecutionFailedHeartbeat(CurrentlyExecuting currentlyExecuting)
Description copied from interface:SchedulerListenerScheduler 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).- Specified by:
onExecutionFailedHeartbeatin interfaceSchedulerListener
-
onSchedulerEvent
public void onSchedulerEvent(SchedulerListener.SchedulerEventType type)
Description copied from interface:SchedulerListenerInternal scheduler event. Primarily intended for testing.- Specified by:
onSchedulerEventin interfaceSchedulerListener
-
onCandidateEvent
public void onCandidateEvent(SchedulerListener.CandidateEventType type)
Description copied from interface:SchedulerListenerInternal scheduler event. Primarily intended for testing.- Specified by:
onCandidateEventin interfaceSchedulerListener
-
-