Interface ThresholdRuleMBean
-
public interface ThresholdRuleMBeanConfigure the conditions and alarm details for a threshold rule.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidactivateRule()Enables this rule.voidaddResetCondition(String parameterSetName, String statistic, String operator, double value)Adds a reset condition to this rule.voidaddResetCondition(String parameterSetName1, String statistic1, String parameterSetName2, String statistic2, String operator, double doubleValue)Adds a reset condition to this rule.voidaddTriggerCondition(String parameterSetName, String statistic, String operator, double value)Adds a trigger condition to this rule.voidaddTriggerCondition(String parameterSetName1, String statistic1, String parameterSetName2, String statistic2, String operator, double value)Adds a trigger condition to this rule.voiddeactivateRule()Disables this rule.AlarmLevelgetAlarmLevel()The alarm level of the alarmStringgetAlarmMessage()The message of the alarmStringgetAlarmType()The alarm type of the alarmString[]getResetConditions()The condition which will reset this rule.StringgetResetConditionsOperator()The reset condition operator.longgetResetPeriod()The reset period.String[]getTriggerConditions()The condition which will trigger this rule.StringgetTriggerConditionsOperator()The trigger condition operator.longgetTriggerPeriod()The rule trigger frequencybooleanisActive()Test the rules is enabledvoidremoveResetCondition(String key)Remove the reset condition for this rulevoidremoveTriggerCondition(String key)Remove the trigger condition for this rulevoidsetAlarm(AlarmLevel level, String type, String message)The alarm that will be raised when this rule trigers and cleared when this rule resets.voidsetResetConditionsOperator(String operator)Changes the reset condition operator.voidsetResetPeriod(long period)Change the reset period.voidsetTriggerConditionsOperator(String operator)Changes the trigger condition operator.voidsetTriggerPeriod(long period)The rule trigger frequency
-
-
-
Method Detail
-
addTriggerCondition
void addTriggerCondition(String parameterSetName, String statistic, String operator, double value) throws ConfigurationException, UnknownStatsParameterSetException, UnrecognizedStatisticException, com.opencloud.util.exception.ValidationException
Adds a trigger condition to this rule.
- Parameters:
parameterSetName- the name of the parameter setstatistic- the name of the statisticoperator- the comparator operatorvalue- the value to compare to- Throws:
ConfigurationException- An exceptionUnknownStatsParameterSetException- An exceptionUnrecognizedStatisticException- An exceptioncom.opencloud.util.exception.ValidationException- An exception
-
addTriggerCondition
void addTriggerCondition(String parameterSetName1, String statistic1, String parameterSetName2, String statistic2, String operator, double value) throws ConfigurationException, UnknownStatsParameterSetException, UnrecognizedStatisticException, com.opencloud.util.exception.ValidationException
Adds a trigger condition to this rule.
- Parameters:
parameterSetName1- the name of the parameter setstatistic1- the name of the statisticparameterSetName2- the name of the parameter setstatistic2- the name of the statisticoperator- the comparator operatorvalue- the value to compare to- Throws:
ConfigurationException- An exceptionUnknownStatsParameterSetException- An exceptionUnrecognizedStatisticException- An exceptioncom.opencloud.util.exception.ValidationException- An exception
-
addResetCondition
void addResetCondition(String parameterSetName, String statistic, String operator, double value) throws ConfigurationException, UnknownStatsParameterSetException, UnrecognizedStatisticException, com.opencloud.util.exception.ValidationException
Adds a reset condition to this rule.
- Parameters:
parameterSetName- the name of the parameter setstatistic- the name of the statisticoperator- the comparator operatorvalue- the value to compare to- Throws:
ConfigurationException- An exceptionUnknownStatsParameterSetException- An exceptionUnrecognizedStatisticException- An exceptioncom.opencloud.util.exception.ValidationException- An exception
-
addResetCondition
void addResetCondition(String parameterSetName1, String statistic1, String parameterSetName2, String statistic2, String operator, double doubleValue) throws ConfigurationException, UnknownStatsParameterSetException, UnrecognizedStatisticException, com.opencloud.util.exception.ValidationException
Adds a reset condition to this rule.
- Parameters:
parameterSetName1- the name of the parameter setstatistic1- the name of the statisticparameterSetName2- the name of the parameter setstatistic2- the name of the statisticoperator- the comparator operatordoubleValue- the value to compare to- Throws:
ConfigurationException- An exceptionUnknownStatsParameterSetException- An exceptionUnrecognizedStatisticException- An exceptioncom.opencloud.util.exception.ValidationException- An exception
-
removeTriggerCondition
void removeTriggerCondition(String key) throws ConfigurationException, com.opencloud.util.exception.ValidationException
Remove the trigger condition for this rule
- Parameters:
key- the trigger condition key- Throws:
ConfigurationException- An exceptioncom.opencloud.util.exception.ValidationException- An exception
-
removeResetCondition
void removeResetCondition(String key) throws ConfigurationException, com.opencloud.util.exception.ValidationException
Remove the reset condition for this rule
- Parameters:
key- the reset condition key- Throws:
ConfigurationException- An exceptioncom.opencloud.util.exception.ValidationException- An exception
-
setTriggerConditionsOperator
void setTriggerConditionsOperator(String operator) throws ConfigurationException, com.opencloud.util.exception.ValidationException
Changes the trigger condition operator.
- Parameters:
operator- the new operator- Throws:
ConfigurationException- An exceptioncom.opencloud.util.exception.ValidationException- An exception
-
setResetConditionsOperator
void setResetConditionsOperator(String operator) throws ConfigurationException, com.opencloud.util.exception.ValidationException
Changes the reset condition operator.
- Parameters:
operator- the new operator- Throws:
ConfigurationException- An exceptioncom.opencloud.util.exception.ValidationException- An exception
-
getTriggerConditionsOperator
String getTriggerConditionsOperator() throws ConfigurationException
The trigger condition operator.
- Returns:
- the operator
- Throws:
ConfigurationException- An exception
-
getResetConditionsOperator
String getResetConditionsOperator() throws ConfigurationException
The reset condition operator.
- Returns:
- the operator
- Throws:
ConfigurationException- An exception
-
setAlarm
void setAlarm(AlarmLevel level, String type, String message) throws ConfigurationException, com.opencloud.util.exception.ValidationException
The alarm that will be raised when this rule trigers and cleared when this rule resets.
- Parameters:
level- the alarm leveltype- the type of the alarmmessage- the alarm message- Throws:
ConfigurationException- An exceptioncom.opencloud.util.exception.ValidationException- An exception
-
activateRule
void activateRule() throws ConfigurationExceptionEnables this rule.
- Throws:
ConfigurationException- An exceptioncom.opencloud.util.exception.ValidationException- An exception
-
deactivateRule
void deactivateRule() throws ConfigurationExceptionDisables this rule.
- Throws:
ConfigurationException- An exceptioncom.opencloud.util.exception.ValidationException- An exception
-
isActive
boolean isActive() throws ConfigurationExceptionTest the rules is enabled
- Returns:
- true/enabled or false/disabled
- Throws:
ConfigurationException- An exception
-
getTriggerConditions
String[] getTriggerConditions() throws ConfigurationException
The condition which will trigger this rule.
- Returns:
- A result
- Throws:
ConfigurationException- An exception
-
getResetConditions
String[] getResetConditions() throws ConfigurationException
The condition which will reset this rule.
- Returns:
- the condition.
- Throws:
ConfigurationException- An exception
-
getAlarmMessage
String getAlarmMessage() throws ConfigurationException
The message of the alarm
- Returns:
- the message
- Throws:
ConfigurationException- An exception
-
getAlarmType
String getAlarmType() throws ConfigurationException
The alarm type of the alarm
- Returns:
- the alarm type
- Throws:
ConfigurationException- An exception
-
getAlarmLevel
AlarmLevel getAlarmLevel() throws ConfigurationException
The alarm level of the alarm
- Returns:
- the alarm level
- Throws:
ConfigurationException- An exception
-
setTriggerPeriod
void setTriggerPeriod(long period) throws ConfigurationException, com.opencloud.util.exception.ValidationExceptionThe rule trigger frequency
- Parameters:
period- the period in milliseconds- Throws:
ConfigurationException- An exceptioncom.opencloud.util.exception.ValidationException- An exception
-
getTriggerPeriod
long getTriggerPeriod() throws ConfigurationExceptionThe rule trigger frequency
- Returns:
- the period in milliseconds
- Throws:
ConfigurationException- An exception
-
setResetPeriod
void setResetPeriod(long period) throws ConfigurationException, com.opencloud.util.exception.ValidationExceptionChange the reset period.
- Parameters:
period- the period in milliseconds- Throws:
ConfigurationException- An exceptioncom.opencloud.util.exception.ValidationException- An exception
-
getResetPeriod
long getResetPeriod() throws ConfigurationExceptionThe reset period.
- Returns:
- the period in milliseconds
- Throws:
ConfigurationException- An exception
-
-