java.lang.Object
javax.management.NotificationBroadcasterSupport
javax.management.monitor.Monitor
javax.management.monitor.GaugeMonitor
- 所有已实现的接口:
MBeanRegistration
,GaugeMonitorMBean
,MonitorMBean
,NotificationBroadcaster
,NotificationEmitter
定义一个监视器 MBean,旨在观察仪表属性的值。
仪表监视器观察随时间连续变化的属性。仪表监视器发送通知如下:
- 如果属性值增加并变得等于或大于高阈值,则发送
threshold high notification
。通知高标志必须设置为true
。
随后超过高阈值不会引起进一步的通知,除非属性值变得等于或小于低阈值。 - 如果属性值正在减小并变得等于或小于低阈值,则发送
threshold low notification
。通知低标志必须设置为true
。
随后越过低阈值不会引起进一步的通知,除非属性值变得等于或大于高阈值。
如果使用仪表差异模式,则派生仪表的值计算为两个连续观测的观测仪表值之间的差值。
使用以下方法计算导出的仪表值 (V[t]):
- V[t] = 规格[t] - 规格[t-GP]
Byte
、Integer
、Short
、Long
、Float
、Double
)。
- 自从:
- 1.5
-
字段摘要
-
构造方法总结
构造方法 -
方法总结
修饰符和类型方法描述已弃用。getDerivedGauge
(ObjectName object) 获取指定对象的派生规格,如果此对象包含在观察到的 MBean 集中,否则为null
。long
已弃用。从 JMX 1.2 开始,由getDerivedGaugeTimeStamp(ObjectName)
取代long
getDerivedGaugeTimeStamp
(ObjectName object) 如果此对象包含在观察到的 MBean 集合中,则获取指定对象的派生标准时间戳,否则获取0
。boolean
获取所有观察到的 MBean 共有的差异模式标志值。获取所有观察到的 MBean 共有的高阈值。获取所有观察到的 MBean 共有的低阈值。返回一个NotificationInfo
对象,其中包含通知的 Java 类名称和仪表监视器发送的通知类型。boolean
获取所有观察到的 MBean 共有的高级通知的开/关开关值。boolean
获取所有观察到的 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()
停止仪表监视器。在类 javax.management.monitor.Monitor 中声明的方法
addObservedObject, containsObservedObject, getGranularityPeriod, getObservedAttribute, getObservedObject, getObservedObjects, isActive, postDeregister, postRegister, preDeregister, preRegister, removeObservedObject, setGranularityPeriod, setObservedAttribute, setObservedObject
在类 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
-
构造方法详细信息
-
GaugeMonitor
public GaugeMonitor()默认构造方法。
-
-
方法详情
-
start
public void start()启动仪表监视器。- 指定者:
start
在接口MonitorMBean
中- 指定者:
start
在类Monitor
中
-
stop
public void stop()停止仪表监视器。- 指定者:
stop
在接口MonitorMBean
中- 指定者:
stop
在类Monitor
中
-
getDerivedGauge
获取指定对象的派生规格,如果此对象包含在观察到的 MBean 集中,否则为null
。- 指定者:
getDerivedGauge
在接口GaugeMonitorMBean
中- 参数:
object
- MBean 的名称。- 返回:
- 指定对象的派生仪表。
-
getDerivedGaugeTimeStamp
如果此对象包含在观察到的 MBean 集合中,则获取指定对象的派生标准时间戳,否则获取0
。- 指定者:
getDerivedGaugeTimeStamp
在接口GaugeMonitorMBean
中- 参数:
object
- 要返回其派生仪表时间戳的对象的名称。- 返回:
- 指定对象的派生仪表时间戳。
-
getDerivedGauge
已弃用。从 JMX 1.2 开始,由getDerivedGauge(ObjectName)
取代返回观察到的 MBean 集合中第一个对象的派生规格。- 指定者:
getDerivedGauge
在接口GaugeMonitorMBean
中- 返回:
- 派生的量规。
-
getDerivedGaugeTimeStamp
已弃用。从 JMX 1.2 开始,由getDerivedGaugeTimeStamp(ObjectName)
取代获取观察到的 MBean 集合中第一个对象的派生规范时间戳。- 指定者:
getDerivedGaugeTimeStamp
在接口GaugeMonitorMBean
中- 返回:
- 派生的仪表时间戳。
-
getHighThreshold
获取所有观察到的 MBean 共有的高阈值。- 指定者:
getHighThreshold
在接口GaugeMonitorMBean
中- 返回:
- 门槛值高。
- 参见:
-
getLowThreshold
获取所有观察到的 MBean 共有的低阈值。- 指定者:
getLowThreshold
在接口GaugeMonitorMBean
中- 返回:
- 低阈值。
- 参见:
-
setThresholds
设置所有观察到的 MBean 共有的高阈值和低阈值。- 指定者:
setThresholds
在接口GaugeMonitorMBean
中- 参数:
highValue
- 高阈值。lowValue
- 低阈值。- 抛出:
IllegalArgumentException
- 指定的高/低阈值为空或低阈值大于高阈值或高阈值和低阈值不是同一类型。- 参见:
-
getNotifyHigh
public boolean getNotifyHigh()获取所有观察到的 MBean 共有的高级通知的开/关开关值。- 指定者:
getNotifyHigh
在接口GaugeMonitorMBean
中- 返回:
true
如果仪表监视器在超过高阈值时发出通知,false
否则。- 参见:
-
setNotifyHigh
public void setNotifyHigh(boolean value) 设置所有观察到的 MBean 通用的高通知开/关开关值。- 指定者:
setNotifyHigh
在接口GaugeMonitorMBean
中- 参数:
value
- 高通知的开/关开关值。- 参见:
-
getNotifyLow
public boolean getNotifyLow()获取所有观察到的 MBean 共有的低通知开/关开关值。- 指定者:
getNotifyLow
在接口GaugeMonitorMBean
中- 返回:
true
如果仪表监视器在超过低阈值时发出通知,false
否则。- 参见:
-
setNotifyLow
public void setNotifyLow(boolean value) 设置所有观察到的 MBean 通用的低通知开/关开关值。- 指定者:
setNotifyLow
在接口GaugeMonitorMBean
中- 参数:
value
- 低通知的开/关开关值。- 参见:
-
getDifferenceMode
public boolean getDifferenceMode()获取所有观察到的 MBean 共有的差异模式标志值。- 指定者:
getDifferenceMode
在接口GaugeMonitorMBean
中- 返回:
true
如果使用差异模式,false
否则。- 参见:
-
setDifferenceMode
public void setDifferenceMode(boolean value) 设置所有观察到的 MBean 共有的差异模式标志值。- 指定者:
setDifferenceMode
在接口GaugeMonitorMBean
中- 参数:
value
- 差异模式标志值。- 参见:
-
getNotificationInfo
返回一个NotificationInfo
对象,其中包含通知的 Java 类名称和仪表监视器发送的通知类型。- 指定者:
getNotificationInfo
在接口NotificationBroadcaster
中- 返回:
- 可能通知的数组。
-
getDerivedGauge(ObjectName)
取代