public class NoopNotifier extends Object implements AnomalyNotifier
Constructor and Description |
---|
NoopNotifier() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Map<String,?> configs)
Configure this class with the given key-value pairs
|
AnomalyNotificationResult |
onBrokerFailure(BrokerFailures brokerFailures)
The method will be called when a broker failure has been detected.
|
AnomalyNotificationResult |
onGoalViolation(GoalViolations goalViolations)
When a particular goal is violated this method will be called.
|
Map<AnomalyType,Boolean> |
selfHealingEnabled()
Check whether the self healing is enabled for different anomaly types.
|
Map<AnomalyType,Float> |
selfHealingEnabledRatio()
Get the ratio during which the self-healing is enabled over the total operating time.
|
boolean |
setSelfHealingFor(AnomalyType anomalyType,
boolean isSelfHealingEnabled)
Enable or disable self healing for the given anomaly type.
|
long |
uptimeMs(long nowMs) |
public void configure(Map<String,?> configs)
CruiseControlConfigurable
configure
in interface CruiseControlConfigurable
public AnomalyNotificationResult onGoalViolation(GoalViolations goalViolations)
AnomalyNotifier
onGoalViolation
in interface AnomalyNotifier
goalViolations
- The detected goal violations.AnomalyNotificationResult.Action
.public AnomalyNotificationResult onBrokerFailure(BrokerFailures brokerFailures)
AnomalyNotifier
onBrokerFailure
in interface AnomalyNotifier
brokerFailures
- the detected broker failuresAnomalyNotificationResult.Action
.public Map<AnomalyType,Boolean> selfHealingEnabled()
AnomalyNotifier
selfHealingEnabled
in interface AnomalyNotifier
public boolean setSelfHealingFor(AnomalyType anomalyType, boolean isSelfHealingEnabled)
AnomalyNotifier
setSelfHealingFor
in interface AnomalyNotifier
anomalyType
- Type of anomaly for which to enable or disable self healing.isSelfHealingEnabled
- True if self healing is enabled, false otherwise.public Map<AnomalyType,Float> selfHealingEnabledRatio()
AnomalyNotifier
selfHealingEnabledRatio
in interface AnomalyNotifier
public long uptimeMs(long nowMs)
uptimeMs
in interface AnomalyNotifier
nowMs
- Current time in ms.