public class AggregateDefinitionMapping extends Object
AggregateDefinitionMapping
is used to keep an in-memory mapping
of all of the AlertDefinition
s that have aggregate definitions
associated with them.Constructor and Description |
---|
AggregateDefinitionMapping()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
AlertDefinition |
getAggregateDefinition(long clusterId,
String name)
Gets an aggregate definition based on a given alert definition name.
|
List<AlertDefinition> |
getAggregateDefinitions(long clusterId)
Gets a copy of all of the aggregate definitions for the specified cluster.
|
List<String> |
getAlertsWithAggregates(long clusterId)
Gets a copy of all of the alerts that have aggregates defined for them.
|
void |
registerAggregate(long clusterId,
AlertDefinition definition)
Adds a mapping for a new aggregate definition.
|
void |
removeAssociatedAggregate(long clusterId,
String aggregatedDefinitonName)
Removes the associated aggregate for the specified aggregated definition.
|
public AlertDefinition getAggregateDefinition(long clusterId, String name)
clusterId
- the ID of the cluster that the definition is bound to.name
- the unique name of the definition.null
if none.public void registerAggregate(long clusterId, AlertDefinition definition)
clusterId
- the ID of the cluster that the definition is bound to.definition
- the aggregate definition to register (not null
).public void removeAssociatedAggregate(long clusterId, String aggregatedDefinitonName)
clusterId
- the ID of the cluster that the definition is bound to.aggregatedDefinitonName
- the unique name of the definition for which aggregates should be
unassociated (not null
).public List<AlertDefinition> getAggregateDefinitions(long clusterId)
clusterId
- the cluster IDCopyright © 2022 Apache Software Foundation. All rights reserved.