1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.springframework.batch.admin.jmx;
17
18 import java.util.Date;
19
20 import org.springframework.jmx.export.annotation.ManagedAttribute;
21 import org.springframework.jmx.export.annotation.ManagedMetric;
22 import org.springframework.jmx.support.MetricType;
23
24
25
26
27
28 public interface JobExecutionMetrics {
29
30 @ManagedMetric(metricType = MetricType.COUNTER, description = "Job Execution Count")
31 int getExecutionCount();
32
33 @ManagedMetric(metricType = MetricType.COUNTER, description = "Job Execution Failure Count")
34 int getFailureCount();
35
36 @ManagedMetric(metricType = MetricType.GAUGE, description = "Latest Duration Milliseconds")
37 double getLatestDuration();
38
39 @ManagedMetric(metricType = MetricType.GAUGE, description = "Mean Duration Milliseconds")
40 double getMeanDuration();
41
42 @ManagedMetric(metricType = MetricType.GAUGE, description = "Max Duration Milliseconds")
43 double getMaxDuration();
44
45 @ManagedAttribute(description = "Latest Job Execution ID")
46 long getLatestExecutionId();
47
48 @ManagedAttribute(description = "Latest Start Time")
49 Date getLatestStartTime();
50
51 @ManagedAttribute(description = "Latest End Time")
52 Date getLatestEndTime();
53
54 @ManagedAttribute(description = "Latest Exit Code")
55 String getLatestExitCode();
56
57 @ManagedAttribute(description = "Latest Status")
58 String getLatestStatus();
59
60 @ManagedAttribute(description = "Latest Step Execution Exit Description")
61 String getLatestStepExitDescription();
62
63 @ManagedAttribute(description = "Latest Step Execution Step Name")
64 String getLatestStepName();
65
66 @ManagedAttribute(description = "Check if there is a Running Job Execution")
67 boolean isJobRunning();
68
69 }