|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.management.NotificationBroadcasterSupport
javax.management.monitor.Monitor
javax.management.monitor.CounterMonitor
public class CounterMonitor
定义专门用来观察计数器属性值的监视器 MBean。
当计数器的值达到或超过已知比较级别阈值时,计数器监视器将发送一个阈值通知。必须将通知标志设置为 true。
另外,偏移量机制支持对特定计数区间的检测。如果偏移量值不为零,则每当计数器值达到比较级别而触发该阈值时,比较级别都将递增该偏移量值。这是在瞬间完成的,即在增加计数前完成。因此,对于每个级别,每当计数增加的区间等于偏移值时,阈值都将触发一个事件通知。
如果计数器能够包含其最大值,则必须指定模。模是将计数器重置为零时的值。
如果使用了计数器差分模式,则派生的尺度值将被视为两次连续观察到的计数器值之间的差分。如果此差分为负值,则派生的尺度值将增加该模的值。派生的尺度值 (V[t]) 是使用以下方法计算的:
Byte、Integer、Short 和 Long)。
| 字段摘要 |
|---|
| 构造方法摘要 | |
|---|---|
CounterMonitor()
默认的构造方法。 |
|
| 方法摘要 | |
|---|---|
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()
获取所有观察到的 MBeans 的共同的差分模式标志值。 |
Number |
getInitThreshold()
获取所有观察对象的公共初始阈值。 |
Number |
getModulus()
获取所有观察到的 MBeans 共同的模值。 |
MBeanNotificationInfo[] |
getNotificationInfo()
返回一个 NotificationInfo 对象,它包含通知的 Java 类的名称和由计数器监视器发送的通知类型。 |
boolean |
getNotify()
获取所有观察到的 MBeans 共同的通知的开/关切换值。 |
Number |
getOffset()
获取所有观察到的 MBeans 共同的偏移量值。 |
Number |
getThreshold()
已过时。 从 JMX 1.2 开始,由 getThreshold(ObjectName) 取代 |
Number |
getThreshold(ObjectName object)
如果指定的对象包含在观察到的 MBeans 集中,则获取指定对象的当前阈值,否则将为 null。 |
void |
setDifferenceMode(boolean value)
设置所有观察到的 MBeans 的共同的差分模式标志值。 |
void |
setInitThreshold(Number value)
设置所有观察对象的共同初始阈值。 |
void |
setModulus(Number value)
设置所有观察到的 MBeans 共同的模值。 |
void |
setNotify(boolean value)
设置所有观察到的 MBeans 共同的通知的开/关切换值。 |
void |
setOffset(Number value)
设置所有观察到的 MBeans 共同的偏移量值。 |
void |
setThreshold(Number value)
已过时。 从 JMX 1.2 开始,由 setInitThreshold(java.lang.Number) 取代 |
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 CounterMonitor()
| 方法详细信息 |
|---|
public void start()
MonitorMBean 中的 startMonitor 中的 startpublic void stop()
MonitorMBean 中的 stopMonitor 中的 stoppublic Number getDerivedGauge(ObjectName object)
null。
CounterMonitorMBean 中的 getDerivedGaugeobject - 将返回其派生尺度的对象的名称。
public long getDerivedGaugeTimeStamp(ObjectName object)
0。
CounterMonitorMBean 中的 getDerivedGaugeTimeStampobject - 将返回其派生尺度时间戳的对象的名称。
public Number getThreshold(ObjectName object)
null。
CounterMonitorMBean 中的 getThresholdobject - 将返回其阈值的对象的名称。
CounterMonitorMBean.setThreshold(java.lang.Number)public Number getInitThreshold()
CounterMonitorMBean 中的 getInitThresholdsetInitThreshold(java.lang.Number)
public void setInitThreshold(Number value)
throws IllegalArgumentException
CounterMonitorMBean 中的 setInitThresholdvalue - 初始阈值。
IllegalArgumentException - 指定的阈值为 null,或者阈值小于零。getInitThreshold()@Deprecated public Number getDerivedGauge()
getDerivedGauge(ObjectName) 取代
CounterMonitorMBean 中的 getDerivedGauge@Deprecated public long getDerivedGaugeTimeStamp()
getDerivedGaugeTimeStamp(ObjectName) 取代
CounterMonitorMBean 中的 getDerivedGaugeTimeStamp@Deprecated public Number getThreshold()
getThreshold(ObjectName) 取代
CounterMonitorMBean 中的 getThresholdsetThreshold(java.lang.Number)
@Deprecated
public void setThreshold(Number value)
throws IllegalArgumentException
setInitThreshold(java.lang.Number) 取代
CounterMonitorMBean 中的 setThresholdvalue - 初始阈值。
IllegalArgumentException - 指定的阈值为 null,或者该阈值小于零。getThreshold()public Number getOffset()
CounterMonitorMBean 中的 getOffsetsetOffset(java.lang.Number)
public void setOffset(Number value)
throws IllegalArgumentException
CounterMonitorMBean 中的 setOffsetvalue - 偏移量值。
IllegalArgumentException - 指定的偏移量值为 null,或者该偏移量值小于零。getOffset()public Number getModulus()
CounterMonitorMBean 中的 getModulussetModulus(java.lang.Number)
public void setModulus(Number value)
throws IllegalArgumentException
CounterMonitorMBean 中的 setModulusvalue - 模值。
IllegalArgumentException - 指定的模为 null,或者该模小于零。getModulus()public boolean getNotify()
CounterMonitorMBean 中的 getNotifytrue,否则返回 false。setNotify(boolean)public void setNotify(boolean value)
CounterMonitorMBean 中的 setNotifyvalue - 通知的开/关切换值。getNotify()public boolean getDifferenceMode()
CounterMonitorMBean 中的 getDifferenceModetrue;否则返回 false。setDifferenceMode(boolean)public void setDifferenceMode(boolean value)
CounterMonitorMBean 中的 setDifferenceModevalue - 差分模式标志值。getDifferenceMode()public MBeanNotificationInfo[] getNotificationInfo()
NotificationInfo 对象,它包含通知的 Java 类的名称和由计数器监视器发送的通知类型。
NotificationBroadcaster 中的 getNotificationInfoNotificationBroadcasterSupport 中的 getNotificationInfo
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。