api/jar/src/main/java/javax/slee/management/AlarmThresholdFilter.java
public boolean isNotificationEnabled(Notification notification) {
        if (!(notification instanceof AlarmNotification)) return false;

        synchronized (knownAlarms) {
            clearStaleTimeouts();

            NotificationInfo info = (NotificationInfo)knownAlarms.get(notification);
            if (info == null) {
                // we've not seen this alarm before, or the period has expired since
                // the first notification
                knownAlarms.put(notification, new NotificationInfo(System.currentTimeMillis()));
                return false;
            }

            if (++info.count == threshold) {
                // passed threshold
                knownAlarms.remove(notification);
                return true;
            }

            return false;
        }
    }
public boolean isNotificationEnabled(Notification notification) {
        if (!(notification instanceof AlarmNotification)) return false;

        synchronized (knownAlarms) {
            clearStaleTimeouts();

            NotificationInfo info = (NotificationInfo)knownAlarms.get(notification);
            if (info == null) {
                // we've not seen this alarm before, or the period has expired since
                // the first notification
                knownAlarms.put(notification, new NotificationInfo(System.currentTimeMillis()));
                return false;
            }

            if (++info.count == threshold) {
                // passed threshold
                knownAlarms.remove(notification);
                return true;
            }

            return false;
        }
    }
Determine whether the specified notification should be delivered to notification
listeners using this notification filter.
@param notification the notification to be sent.
@return <code>true</code> if the notification should be delivered to notification
listeners, <code>false</code> otherwise.  This method always returns
<code>false</code> if <code>notification</code> is not an instance of
{@link AlarmNotification}.