public class GaugeMonitor extends Monitor implements GaugeMonitorMBean
仪表监视器观察随时间连续变化的属性。 仪表监视器发送通知如下:
threshold high notification 。 通知高标志必须设置为true 。 threshold low notification 。 通知低位标志必须设置为true 。 如果使用量规差异模式,则派生量规的值被计算为两次连续观察值的观测值之间的差值。
导出的量规值(V [t])使用以下方法计算:
Byte , Integer , Short , Long , Float , Double )。
alreadyNotified, alreadyNotifieds, capacityIncrement, dbgTag, elementCount, OBSERVED_ATTRIBUTE_ERROR_NOTIFIED, OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED, OBSERVED_OBJECT_ERROR_NOTIFIED, RESET_FLAGS_ALREADY_NOTIFIED, RUNTIME_ERROR_NOTIFIED, server| Constructor and Description |
|---|
GaugeMonitor()
默认构造函数。
|
| Modifier and Type | Method and Description |
|---|---|
Number |
getDerivedGauge()
已弃用
截至JMX 1.2,由
getDerivedGauge(ObjectName)替代
|
Number |
getDerivedGauge(ObjectName object)
如果此对象包含在观察到的MBean集合中,则获取指定对象的派生规格,否则
null null。
|
long |
getDerivedGaugeTimeStamp()
已弃用
截至JMX 1.2,由
getDerivedGaugeTimeStamp(ObjectName)替换
|
long |
getDerivedGaugeTimeStamp(ObjectName object)
如果此对象包含在观察到的MBean集合中,则获取指定对象的派生标尺时间戳,否则
0 0。
|
boolean |
getDifferenceMode()
获取所有观察到的MBean共有的差异模式标志值。
|
Number |
getHighThreshold()
获得所有观察到的MBean共有的高阈值。
|
Number |
getLowThreshold()
获得所有观察到的MBean共有的低阈值。
|
MBeanNotificationInfo[] |
getNotificationInfo()
返回一个
NotificationInfo对象,其中包含通知的Java类的名称和量规监视器发送的通知类型。
|
boolean |
getNotifyHigh()
获取所有观察到的MBean通用的高通知开/关切换值。
|
boolean |
getNotifyLow()
获取所有观察到的MBean通用的低通知开/关切换值。
|
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()
停止仪表监视器。
|
addObservedObject, containsObservedObject, getGranularityPeriod, getObservedAttribute, getObservedObject, getObservedObjects, isActive, postDeregister, postRegister, preDeregister, preRegister, removeObservedObject, setGranularityPeriod, setObservedAttribute, setObservedObjectaddNotificationListener, handleNotification, removeNotificationListener, removeNotificationListener, sendNotificationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddObservedObject, containsObservedObject, getGranularityPeriod, getObservedAttribute, getObservedObject, getObservedObjects, isActive, removeObservedObject, setGranularityPeriod, setObservedAttribute, setObservedObjectpublic void start()
start在界面
MonitorMBean
start中的
Monitor
public void stop()
stop在接口
MonitorMBean
stop在
Monitor
public Number getDerivedGauge(ObjectName object)
null null。
getDerivedGauge在界面
GaugeMonitorMBean
object - MBean的名称。
public long getDerivedGaugeTimeStamp(ObjectName object)
0 0。
getDerivedGaugeTimeStamp在界面
GaugeMonitorMBean
object - 要返回派生标尺时间戳的对象的名称。
@Deprecated public Number getDerivedGauge()
getDerivedGauge(ObjectName)取代
getDerivedGauge在界面
GaugeMonitorMBean
@Deprecated public long getDerivedGaugeTimeStamp()
getDerivedGaugeTimeStamp(ObjectName)替代
getDerivedGaugeTimeStamp在界面
GaugeMonitorMBean
public Number getHighThreshold()
getHighThreshold在界面
GaugeMonitorMBean
setThresholds(java.lang.Number, java.lang.Number)
public Number getLowThreshold()
getLowThreshold在界面
GaugeMonitorMBean
setThresholds(java.lang.Number, java.lang.Number)
public void setThresholds(Number highValue, Number lowValue) throws IllegalArgumentException
setThresholds在界面
GaugeMonitorMBean
highValue - 高阈值。
lowValue - 低阈值。
IllegalArgumentException - 指定的高/低阈值为零或低阈值大于高阈值或高阈值,低阈值不是相同类型。
getHighThreshold() ,
getLowThreshold()
public boolean getNotifyHigh()
getNotifyHigh在界面
GaugeMonitorMBean
true如果仪表监视器在超过高门限时通知,
false false。
setNotifyHigh(boolean)
public void setNotifyHigh(boolean value)
setNotifyHigh在界面
GaugeMonitorMBean
value - 高通知的开/关开关值。
getNotifyHigh()
public boolean getNotifyLow()
getNotifyLow在界面
GaugeMonitorMBean
true如果仪表监视器通知超过低阈值,
false否则。
setNotifyLow(boolean)
public void setNotifyLow(boolean value)
setNotifyLow在界面
GaugeMonitorMBean
value - 低通知的开/关开关值。
getNotifyLow()
public boolean getDifferenceMode()
getDifferenceMode在接口
GaugeMonitorMBean
true如果使用差异模式,
false false。
setDifferenceMode(boolean)
public void setDifferenceMode(boolean value)
setDifferenceMode在界面
GaugeMonitorMBean
value - 差异模式标志值。
getDifferenceMode()
public MBeanNotificationInfo[] getNotificationInfo()
NotificationInfo对象,其中包含通知的Java类的名称以及量规监视器发送的通知类型。
getNotificationInfo在界面
NotificationBroadcaster
getNotificationInfo在类别
NotificationBroadcasterSupport
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.