Package ch.tocco.nice2.metrics.impl.task
Class MetricsJobListener
java.lang.Object
org.quartz.listeners.JobListenerSupport
ch.tocco.nice2.metrics.impl.task.MetricsJobListener
- All Implemented Interfaces:
org.quartz.JobListener
@Component
@Order(10000)
public class MetricsJobListener
extends org.quartz.listeners.JobListenerSupport
This service is eagerly loaded at startup and observes
all tasks executed by the
TaskSchedulingService
and collects
metrics if necessary.-
Field Summary
-
Constructor Summary
ConstructorDescriptionMetricsJobListener
(MetricsRecorderService recorderService, BatchJobManager batchJobManager) -
Method Summary
Modifier and TypeMethodDescriptiongetName()
void
jobToBeExecuted
(org.quartz.JobExecutionContext context) Methods inherited from class org.quartz.listeners.JobListenerSupport
getLog, jobExecutionVetoed, jobWasExecuted
-
Field Details
-
BATCH_JOB_CATEGORY
- See Also:
-
-
Constructor Details
-
MetricsJobListener
public MetricsJobListener(MetricsRecorderService recorderService, @Lazy BatchJobManager batchJobManager)
-
-
Method Details
-
getName
-
jobToBeExecuted
public void jobToBeExecuted(org.quartz.JobExecutionContext context) - Specified by:
jobToBeExecuted
in interfaceorg.quartz.JobListener
- Overrides:
jobToBeExecuted
in classorg.quartz.listeners.JobListenerSupport
-