Interface ThresholdRuleMBean
-
public interface ThresholdRuleMBean
Configure the conditions and alarm details for a threshold rule.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
activateRule()
Enables this rule.void
addResetCondition(String parameterSetName, String statistic, String operator, double value)
Adds a reset condition to this rule.void
addResetCondition(String parameterSetName1, String statistic1, String parameterSetName2, String statistic2, String operator, double doubleValue)
Adds a reset condition to this rule.void
addTriggerCondition(String parameterSetName, String statistic, String operator, double value)
Adds a trigger condition to this rule.void
addTriggerCondition(String parameterSetName1, String statistic1, String parameterSetName2, String statistic2, String operator, double value)
Adds a trigger condition to this rule.void
deactivateRule()
Disables this rule.AlarmLevel
getAlarmLevel()
The alarm level of the alarmString
getAlarmMessage()
The message of the alarmString
getAlarmType()
The alarm type of the alarmString[]
getResetConditions()
The condition which will reset this rule.String
getResetConditionsOperator()
The reset condition operator.long
getResetPeriod()
The reset period.String[]
getTriggerConditions()
The condition which will trigger this rule.String
getTriggerConditionsOperator()
The trigger condition operator.long
getTriggerPeriod()
The rule trigger frequencyboolean
isActive()
Test the rules is enabledvoid
removeResetCondition(String key)
Remove the reset condition for this rulevoid
removeTriggerCondition(String key)
Remove the trigger condition for this rulevoid
setAlarm(AlarmLevel level, String type, String message)
The alarm that will be raised when this rule trigers and cleared when this rule resets.void
setResetConditionsOperator(String operator)
Changes the reset condition operator.void
setResetPeriod(long period)
Change the reset period.void
setTriggerConditionsOperator(String operator)
Changes the trigger condition operator.void
setTriggerPeriod(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 ConfigurationException
Enables this rule.
- Throws:
ConfigurationException
- An exceptioncom.opencloud.util.exception.ValidationException
- An exception
-
deactivateRule
void deactivateRule() throws ConfigurationException
Disables this rule.
- Throws:
ConfigurationException
- An exceptioncom.opencloud.util.exception.ValidationException
- An exception
-
isActive
boolean isActive() throws ConfigurationException
Test 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.ValidationException
The rule trigger frequency
- Parameters:
period
- the period in milliseconds- Throws:
ConfigurationException
- An exceptioncom.opencloud.util.exception.ValidationException
- An exception
-
getTriggerPeriod
long getTriggerPeriod() throws ConfigurationException
The rule trigger frequency
- Returns:
- the period in milliseconds
- Throws:
ConfigurationException
- An exception
-
setResetPeriod
void setResetPeriod(long period) throws ConfigurationException, com.opencloud.util.exception.ValidationException
Change the reset period.
- Parameters:
period
- the period in milliseconds- Throws:
ConfigurationException
- An exceptioncom.opencloud.util.exception.ValidationException
- An exception
-
getResetPeriod
long getResetPeriod() throws ConfigurationException
The reset period.
- Returns:
- the period in milliseconds
- Throws:
ConfigurationException
- An exception
-
-