org.hyperic.hq.events.server.session
Class CounterExecutionStrategy
java.lang.Object
org.hyperic.hq.events.server.session.CounterExecutionStrategy
- All Implemented Interfaces:
- ExecutionStrategy
public class CounterExecutionStrategy
- extends java.lang.Object
- implements ExecutionStrategy
Implementation of ExecutionStrategy that fires an
AlertConditionsSatisfiedZEvent when a certain number of events have
occurred within a given time window. Logic originally kept in a
CounterTrigger class.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CounterExecutionStrategy
public CounterExecutionStrategy(long count,
long timeRange,
ZeventEnqueuer zeventEnqueuer)
- Parameters:
count - The number of times the alert conditions must be satisfiedtimeRange - The time window (in milliseconds) in which the specified
count of alert conditions must be satisfied.zeventEnqueuer - The ZeventEnqueuer to use for sending
AlertConditionsSatisfiedZEvents
conditionsSatisfied
public void conditionsSatisfied(AlertConditionsSatisfiedZEvent event)
- Description copied from interface:
ExecutionStrategy
- Indicates that all conditions associated with an alert definition have
been met
- Specified by:
conditionsSatisfied in interface ExecutionStrategy
- Parameters:
event - An AlertConditionsSatisfiedZEvent to process
getState
public java.io.Serializable getState()
- Specified by:
getState in interface ExecutionStrategy
- Returns:
- Any state held by this strategy that should be persisted between
server restarts. May be null if no state saved.
initialize
public void initialize(java.io.Serializable initialState)
- Description copied from interface:
ExecutionStrategy
- Initializes this strategy
- Specified by:
initialize in interface ExecutionStrategy
- Parameters:
initialState - Any state that was saved by the strategy with this
alertDefinitionId the last time the server was shutdown. May be
null if no state saved.
Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.