View Javadoc
1   /*
2    * Copyright 2009-2010 the original author or authors.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.springframework.batch.admin.jmx;
17  
18  import org.springframework.jmx.export.annotation.ManagedAttribute;
19  import org.springframework.jmx.export.annotation.ManagedMetric;
20  import org.springframework.jmx.support.MetricType;
21  
22  /**
23   * @author Dave Syer
24   *
25   */
26  public interface StepExecutionMetrics {
27  
28  	@ManagedMetric(metricType = MetricType.COUNTER, description = "Step Execution Count")
29  	int getExecutionCount();
30  
31  	@ManagedMetric(metricType = MetricType.COUNTER, description = "Step Execution Failure Count")
32  	int getFailureCount();
33  
34  	@ManagedMetric(metricType = MetricType.GAUGE, description = "Latest Duration Milliseconds")
35  	double getLatestDuration();
36  
37  	@ManagedMetric(metricType = MetricType.GAUGE, description = "Mean Duration Milliseconds")
38  	double getMeanDuration();
39  
40  	@ManagedMetric(metricType = MetricType.GAUGE, description = "Max Duration Milliseconds")
41  	double getMaxDuration();
42  
43  	@ManagedMetric(metricType = MetricType.GAUGE, description = "Latest Step Execution ID")
44  	long getLatestExecutionId();
45  
46  	@ManagedMetric(metricType = MetricType.GAUGE, description = "Latest Read Count")
47  	int getLatestReadCount();
48  
49  	@ManagedMetric(metricType = MetricType.GAUGE, description = "Latest Write Count")
50  	int getLatestWriteCount();
51  
52  	@ManagedMetric(metricType = MetricType.GAUGE, description = "Latest Filter Count")
53  	int getLatestFilterCount();
54  
55  	@ManagedMetric(metricType = MetricType.GAUGE, description = "Latest Skip Count")
56  	int getLatestSkipCount();
57  
58  	@ManagedMetric(metricType = MetricType.GAUGE, description = "Latest Commit Count")
59  	int getLatestCommitCount();
60  
61  	@ManagedMetric(metricType = MetricType.GAUGE, description = "Latest Rollback Count")
62  	int getLatestRollbackCount();
63  
64  	@ManagedAttribute(description  = "Latest Status")
65  	String getLatestStatus();
66  
67  	@ManagedAttribute(description  = "Latest Exit Code")
68  	String getLatestExitCode();
69  
70  	@ManagedAttribute(description  = "Latest Exit Description")
71  	String getLatestExitDescription();
72  
73  }