Class: javax.management.monitor.GaugeMonitor
- public class GaugeMonitor
- extends Monitor
- implements GaugeMonitorMBean
Defines a monitor MBean designed to observe the values of a gauge attribute.
A gauge monitor observes an attribute that is continuously variable with time. A gauge monitor sends notifications as follows:
- if the attribute value is increasing and becomes equal to or
greater than the high threshold value, a threshold high
notification is sent. The notify high flag must be set to
true.
Subsequent crossings of the high threshold value do not cause further notifications unless the attribute value becomes equal to or less than the low threshold value. - if the attribute value is decreasing and becomes equal to or
less than the low threshold value, a threshold low
notification is sent. The notify low flag must be set to
true.
Subsequent crossings of the low threshold value do not cause further notifications unless the attribute value becomes equal to or greater than the high threshold value.
If the gauge difference mode is used, the value of the derived
gauge is calculated as the difference between the observed gauge
values for two successive observations.
The derived gauge value (V[t]) is calculated using the following method:
- V[t] = gauge[t] - gauge[t-GP]
Byte, Integer, Short,
Long, Float, Double).Inheritance
Superclass tree:- java.lang.Object
- javax.management.NotificationBroadcasterSupport
- javax.management.monitor.Monitor
- javax.management.monitor.GaugeMonitor
Methods
-
GaugeMonitortop
public GaugeMonitor()Default constructor. -
getDerivedGaugetop
public synchronized Number getDerivedGauge()Returns the derived gauge of the first object in the set of observed MBeans.- Specified by:
- getDerivedGauge from GaugeMonitorMBean
-
getDerivedGaugetop
Gets the derived gauge of the specified object, if this object is contained in the set of observed MBeans, ornullotherwise.- Specified by:
- getDerivedGauge from GaugeMonitorMBean
-
getDerivedGaugeTimeStamptop
public synchronized long getDerivedGaugeTimeStamp()Gets the derived gauge timestamp of the first object in the set of observed MBeans.- Specified by:
- getDerivedGaugeTimeStamp from GaugeMonitorMBean
-
getDerivedGaugeTimeStamptop
public synchronized long getDerivedGaugeTimeStamp(ObjectName object)Gets the derived gauge timestamp of the specified object, if this object is contained in the set of observed MBeans, or0otherwise.- Specified by:
- getDerivedGaugeTimeStamp from GaugeMonitorMBean
-
getDifferenceModetop
public synchronized boolean getDifferenceMode()Gets the difference mode flag value common to all observed MBeans.- Specified by:
- getDifferenceMode from GaugeMonitorMBean
-
getHighThresholdtop
public synchronized Number getHighThreshold()Gets the high threshold value common to all observed MBeans.- Specified by:
- getHighThreshold from GaugeMonitorMBean
-
getLowThresholdtop
public synchronized Number getLowThreshold()Gets the low threshold value common to all observed MBeans.- Specified by:
- getLowThreshold from GaugeMonitorMBean
-
getNotificationInfotop
public MBeanNotificationInfo[] getNotificationInfo()Returns aNotificationInfoobject containing the name of the Java class of the notification and the notification types sent by the gauge monitor.- Specified by:
- getNotificationInfo from NotificationBroadcaster
- Override hierarchy:
- getNotificationInfo from NotificationBroadcasterSupport
-
getNotifyHightop
public synchronized boolean getNotifyHigh()Gets the high notification's on/off switch value common to all observed MBeans.- Specified by:
- getNotifyHigh from GaugeMonitorMBean
-
getNotifyLowtop
public synchronized boolean getNotifyLow()Gets the low notification's on/off switch value common to all observed MBeans.- Specified by:
- getNotifyLow from GaugeMonitorMBean
-
setDifferenceModetop
public synchronized void setDifferenceMode(boolean value)Sets the difference mode flag value common to all observed MBeans.- Specified by:
- setDifferenceMode from GaugeMonitorMBean
-
setNotifyHightop
public synchronized void setNotifyHigh(boolean value)Sets the high notification's on/off switch value common to all observed MBeans.- Specified by:
- setNotifyHigh from GaugeMonitorMBean
-
setNotifyLowtop
public synchronized void setNotifyLow(boolean value)Sets the low notification's on/off switch value common to all observed MBeans.- Specified by:
- setNotifyLow from GaugeMonitorMBean
-
setThresholdstop
public synchronized void setThresholds(Number highValue, Number lowValue) throws IllegalArgumentExceptionSets the high and the low threshold values common to all observed MBeans.- Specified by:
- setThresholds from GaugeMonitorMBean
-
starttop
public synchronized void start()Starts the gauge monitor.- Specified by:
- start from MonitorMBean
-
stoptop
public synchronized void stop()Stops the gauge monitor.- Specified by:
- stop from MonitorMBean
