org.rhq.enterprise.server.alert.engine.model
Class AbstractCacheElement<T>
java.lang.Object
org.rhq.enterprise.server.alert.engine.model.AbstractCacheElement<T>
- Direct Known Subclasses:
- AbstractEnumCacheElement, CallTimeDataCacheElement, DriftCacheElement, NumericDoubleCacheElement, ResourceConfigurationCacheElement, StringCacheElement
public abstract class AbstractCacheElement<T>
- extends Object
- Author:
- Joseph Marques
log
protected final org.apache.commons.logging.Log log
alertConditionOperator
protected AlertConditionOperator alertConditionOperator
alertConditionOperatorOption
protected Object alertConditionOperatorOption
alertConditionValue
protected T alertConditionValue
alertConditionTriggerId
protected int alertConditionTriggerId
active
protected boolean active
nextCacheElement
protected AbstractCacheElement<?> nextCacheElement
AbstractCacheElement
public AbstractCacheElement(AlertConditionOperator operator,
T value,
int conditionTriggerId)
AbstractCacheElement
public AbstractCacheElement(AlertConditionOperator operator,
Object operatorOption,
T value,
int conditionId)
setNextCacheElement
public void setNextCacheElement(AbstractCacheElement<?> nextCacheElement)
getAlertConditionOperator
public AlertConditionOperator getAlertConditionOperator()
getAlertConditionOperatorOption
public Object getAlertConditionOperatorOption()
getAlertConditionValue
public T getAlertConditionValue()
setAlertConditionValue
public void setAlertConditionValue(T updatedValue)
getAlertConditionTriggerId
public int getAlertConditionTriggerId()
isActive
public boolean isActive()
setActive
public void setActive(boolean active)
process
public final boolean process(T providedValue,
Object... extraParams)
matches
public abstract boolean matches(T providedValue,
Object... extras)
getOperatorSupportsType
public abstract AlertConditionOperator.Type getOperatorSupportsType(AlertConditionOperator operator)
- For the most part, the operator itself denotes whether it makes comparisons against a sliding scale or not.
However, this doesn't hold in every conceivable scenario. Thus, the defaultSupportsType will support 95% of the
use cases, and the AbstractCacheElement's getOperatorSupportsType will have a chance to override this.
- See Also:
AlertConditionOperator
isType
public boolean isType(AlertConditionOperator.Type type)
- convenience method to test whether this cache element instance equals the specified type
convertValueToString
public String convertValueToString(T providedValue)
toString
public String toString()
- Overrides:
toString in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.