public class StepExecutionServiceLevelMonitor extends Object implements org.springframework.beans.factory.FactoryBean<GaugeMonitor>, org.springframework.beans.factory.InitializingBean
MonitorMBean
so it can be automatically
exposed to an existing MBeanServer using Spring JMX. JMX clients subscribe to
notifications and receive them whenever the thresholds are crossed.Constructor and Description |
---|
StepExecutionServiceLevelMonitor() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
GaugeMonitor |
getObject() |
Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setAutoStart(boolean autoStart)
Should the monitor start immediately or wait to be started manually?
|
void |
setDefaultDomain(String defaultDomain)
The domain name to use in constructing object names for the monitored
step.
|
void |
setJobName(String jobName) |
void |
setLowerThreshold(int lowerThreshold)
Optional lower threshold.
|
void |
setObservedAttribute(String observedAttribute)
The name of the attribute to monitor on the step.
|
void |
setStepName(String stepName) |
void |
setUpperThreshold(int upperThreshold)
Upper threshold for observed attribute.
|
public void setObservedAttribute(String observedAttribute)
LatestDuration
. This can be changed at runtime, but note
that if the type of the observed metric changes (e.g. from double to
integer) then the thresholds will also have to be changed so their type
matches.observedAttribute
- the observed attribute to setpublic void setAutoStart(boolean autoStart)
autoStart
- the auto start flag to setpublic void setDefaultDomain(String defaultDomain)
org.springframework.batch
(same as
BatchMBeanExporter
).defaultDomain
- the default domain to setpublic void setStepName(String stepName)
stepName
- the stepName to setpublic void setJobName(String jobName)
jobName
- the jobName to setpublic void setUpperThreshold(int upperThreshold)
upperThreshold
- the upper threshold to setpublic void setLowerThreshold(int lowerThreshold)
lowerThreshold
- the lower threshold to setpublic GaugeMonitor getObject() throws Exception
getObject
in interface org.springframework.beans.factory.FactoryBean<GaugeMonitor>
Exception
public Class<?> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<GaugeMonitor>
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean<GaugeMonitor>
Copyright © 2015. All rights reserved.