|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.slee.management.AlarmThresholdFilter
public class AlarmThresholdFilter
A notification filter that supresses equivalent AlarmNotifications
until a specified number have occurred within a specified time period. Once
the threshold has been reached, the next equivalent alarm notification is allowed
through the filter, and the cycle restarts. The cycle also restarts if the time
period from the first notification expires without a notification being sent.
This filter can be used to suppress alarms that occur and then clear up spontaneously.
Formally: Given a series of duplicate alarm notifications, if
threshold + 1 notification are observed within period
milliseconds of the first notification, notification number threshold + 1
is delivered to notification listeners and counting restarts from notification
number threshold + 2.
Alarm notification equivalence is tested using the AlarmNotification.equals(java.lang.Object)
method.
Notifications that are not instances of AlarmNotification are suppressed
by this filter.
Note: This filter implementation does not use threads to clear stale timeouts.
Instead, stale timeouts are cleared on each invocation of isNotificationEnabled. Methods in this class are also thread-safe.
| Constructor Summary | |
|---|---|
AlarmThresholdFilter(int threshold,
long period)
Create an AlarmThresholdFilter. |
|
| Method Summary | |
|---|---|
boolean |
isNotificationEnabled(javax.management.Notification notification)
Determine whether the specified notification should be delivered to notification listeners using this notification filter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AlarmThresholdFilter(int threshold,
long period)
AlarmThresholdFilter.
threshold - the number of duplicate notifications that must occur within
the specified time period before the following duplicate notification
is delivered to notification listeners.period - the period (measured in ms) during which duplicate alarm
notifications within the threshold number will be discarded.| Method Detail |
|---|
public boolean isNotificationEnabled(javax.management.Notification notification)
isNotificationEnabled in interface javax.management.NotificationFilternotification - the notification to be sent.
true if the notification should be delivered to notification
listeners, false otherwise. This method always returns
false if notification is not an instance of
AlarmNotification.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||