| 
JavaTM Platform Standard Ed. 6  | 
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.management.NotificationBroadcasterSupport
javax.management.monitor.Monitor
javax.management.monitor.GaugeMonitor
public class GaugeMonitor
定义专门用来观察尺度属性值的监视器 MBean。
尺度监视器观察随着时间发展而不断变化的属性。尺度监视器将根据以下情况发送通知:
阈值过高通知。必须将 notify high 标志设置为 true。
阈值过低通知。必须将 notify low 标志设置为 true。
 如果使用了尺度差分模式,则派生的尺度值将被视为两次连续观察到的观察尺度值之间的差分。
派生的尺度值 (V[t]) 是使用以下方法计算的:
 
Byte、Integer、Short、Long、Float 和 Double)。
| 字段摘要 | 
|---|
| 构造方法摘要 | |
|---|---|
GaugeMonitor()
默认的构造方法。  | 
|
| 方法摘要 | |
|---|---|
 Number | 
getDerivedGauge()
已过时。 从 JMX 1.2 开始,由 getDerivedGauge(ObjectName) 取代 | 
 Number | 
getDerivedGauge(ObjectName object)
如果指定的对象包含在所观察的 MBeans 集中,则获取此对象派生的尺度,否则将为 null。 | 
 long | 
getDerivedGaugeTimeStamp()
已过时。 从 JMX 1.2 开始,由 getDerivedGaugeTimeStamp(ObjectName) 取代 | 
 long | 
getDerivedGaugeTimeStamp(ObjectName object)
如果指定的对象包含在所观察的 MBeans 集中,则获取此对象的派生尺度的时间戳,否则将为 0。 | 
 boolean | 
getDifferenceMode()
获取所有观察到的 MBean 的公共差分模式标志值。  | 
 Number | 
getHighThreshold()
获取所有所观察的 MBean 的公共高阈值。  | 
 Number | 
getLowThreshold()
获取所有观察到的 MBean 的公共低阈值。  | 
 MBeanNotificationInfo[] | 
getNotificationInfo()
返回一个 NotificationInfo 对象,它包含通知的 Java 类的名称和由尺度监视器发送的通知类型。 | 
 boolean | 
getNotifyHigh()
获取所有观察到的 MBean 的公共高阈值通知 (high notification) 的开/关切换值。  | 
 boolean | 
getNotifyLow()
获取所有观察到的 MBean 的公共低阈值通知 (low notification) 的开/关切换值。  | 
 void | 
setDifferenceMode(boolean value)
设置所有观察到的 MBean 的公共差分模式标志值。  | 
 void | 
setNotifyHigh(boolean value)
设置所有观察到的 MBean 的公共高阈值通知的开/关切换值。  | 
 void | 
setNotifyLow(boolean value)
设置所有观察到的 MBean 的公共低阈值通知的开/关切换值。  | 
 void | 
setThresholds(Number highValue,
              Number lowValue)
设置所有观察到的 MBean 的公共高、低阈值。  | 
 void | 
start()
启用尺度监视器。  | 
 void | 
stop()
停止尺度监视器。  | 
| 从类 javax.management.NotificationBroadcasterSupport 继承的方法 | 
|---|
addNotificationListener, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification | 
| 从类 java.lang.Object 继承的方法 | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| 从接口 javax.management.monitor.MonitorMBean 继承的方法 | 
|---|
addObservedObject, containsObservedObject, getGranularityPeriod, getObservedAttribute, getObservedObject, getObservedObjects, isActive, removeObservedObject, setGranularityPeriod, setObservedAttribute, setObservedObject | 
| 构造方法详细信息 | 
|---|
public GaugeMonitor()
| 方法详细信息 | 
|---|
public void start()
MonitorMBean 中的 startMonitor 中的 startpublic void stop()
MonitorMBean 中的 stopMonitor 中的 stoppublic Number getDerivedGauge(ObjectName object)
null。
GaugeMonitorMBean 中的 getDerivedGaugeobject - MBean 的名称。
public long getDerivedGaugeTimeStamp(ObjectName object)
0。
GaugeMonitorMBean 中的 getDerivedGaugeTimeStampobject - 将返回其派生尺度时间戳的对象的名称。
@Deprecated public Number getDerivedGauge()
getDerivedGauge(ObjectName) 取代
GaugeMonitorMBean 中的 getDerivedGauge@Deprecated public long getDerivedGaugeTimeStamp()
getDerivedGaugeTimeStamp(ObjectName) 取代
GaugeMonitorMBean 中的 getDerivedGaugeTimeStamppublic Number getHighThreshold()
GaugeMonitorMBean 中的 getHighThresholdpublic Number getLowThreshold()
GaugeMonitorMBean 中的 getLowThresholdpublic void setThresholds(Number highValue, Number lowValue) throws IllegalArgumentException
GaugeMonitorMBean 中的 setThresholdshighValue - 高阈值。lowValue - 低阈值。
IllegalArgumentException - 指定的高/低阈值为 null,或者低阈值大于高阈值,或者高、低阈值不属于同一类型。getHighThreshold(), 
getLowThreshold()public boolean getNotifyHigh()
GaugeMonitorMBean 中的 getNotifyHightrue,否则返回 false。setNotifyHigh(boolean)public void setNotifyHigh(boolean value)
GaugeMonitorMBean 中的 setNotifyHighvalue - 高阈值通知的开/关切换值。getNotifyHigh()public boolean getNotifyLow()
GaugeMonitorMBean 中的 getNotifyLowtrue,否则返回 false。setNotifyLow(boolean)public void setNotifyLow(boolean value)
GaugeMonitorMBean 中的 setNotifyLowvalue - 低阈值通知的开/关切换值。getNotifyLow()public boolean getDifferenceMode()
GaugeMonitorMBean 中的 getDifferenceModetrue;否则返回 false。setDifferenceMode(boolean)public void setDifferenceMode(boolean value)
GaugeMonitorMBean 中的 setDifferenceModevalue - 差分模式标志值。getDifferenceMode()public MBeanNotificationInfo[] getNotificationInfo()
NotificationInfo 对象,它包含通知的 Java 类的名称和由尺度监视器发送的通知类型。
  | 
JavaTM Platform Standard Ed. 6  | 
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。