modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java | 20 ++++++---- 1 file changed, 13 insertions(+), 7 deletions(-)
New commits: commit d4a02cc3c2fb7e999fede59f3813357e6b0e79ec Author: John Mazzitelli mazz@redhat.com Date: Mon Sep 20 09:19:34 2010 -0400
add more javadocs to explain what the fields are for calltime alert conditions
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java b/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java index 3218d9d..640648b 100644 --- a/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java +++ b/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java @@ -390,6 +390,8 @@ public class AlertCondition implements Serializable { * THRESHOLD: the name of the metric (TODO: today its the display name, very bad for i18n purposes) * BASELINE: the name of the metric (TODO: today its the display name, very bad for i18n purposes) * CHANGE: the name of the metric (TODO: today its the display name, very bad for i18n purposes) + * OR (for calltime alert conditions only) this will be the optional regular expression condition + * (which may be null) * TRAIT: the name of the trait (TODO: today its the display name, very bad for i18n purposes) * CONTROL: the name of the operation (not its display name) * EVENT: the level of event to compare with (DEBUG, INFO, WARN, ERROR, FATAL) @@ -405,11 +407,14 @@ public class AlertCondition implements Serializable { }
/** - * One of these comparators: "<", ">" or "=". - * This will be null if the condition does not compare values. Only THRESHOLD - * and BASELINE condition categories use comparators; other types of conditions - * will return <code>null</code>. + * Will be one of these comparators: "<", ">" or "=" but only for THRESHOLD + * and BASELINE condition categories. For calltime alert conditions (i.e. category + * CHANGE for calltime metric definitions), comparator will be one of these + * comparators: "HI", "LO", "CH" (where "CH" means "change"). * + * Other types of conditions will return <code>null</code> (i.e. this will be + * null if the condition does not compare values). + * * @return comparator string */ public String getComparator() { @@ -422,7 +427,8 @@ public class AlertCondition implements Serializable {
/** * Returns the threshold to compare a measurement value to see if the condition is true. - * This is only valid for conditions of category THRESHOLD and BASELINE. All other + * This is only valid for conditions of category THRESHOLD, BASELINE and CHANGE (but + * only where CHANGE is for a calltime metric alert condition). All other * condition types will return <code>null</code>. * * @return threshold value or null @@ -438,9 +444,9 @@ public class AlertCondition implements Serializable { /** * The option string is optional and its semantics differ based on the category of this condition: * AVAILABILITY: the {@link AvailabilityType} to trigger off of (DOWN or UP) - * THRESHOLD: n/a + * THRESHOLD: for calltime metric conditions, one of "MIN, "MAX", "AVG" - all others are n/a * BASELINE: one of "min", "max" or "mean" - indicates what the threshold is compared to (min/max/avg baseline value) - * CHANGE: n/a + * CHANGE: for calltime metric conditions, one of "MIN, "MAX", "AVG" - all others are n/a * TRAIT: n/a * CONTROL: the {@link OperationRequestStatus} name (SUCCESS, FAILURE, etc). * EVENT: the regular expression of the message to match (which may be empty string if not specified)
rhq-commits@lists.fedorahosted.org