org.rhq.enterprise.server.alert.engine
Class AlertConditionCacheManagerBean

java.lang.Object
  extended by org.rhq.enterprise.server.alert.engine.AlertConditionCacheManagerBean
All Implemented Interfaces:
AlertConditionCacheManagerLocal

public class AlertConditionCacheManagerBean
extends Object
implements AlertConditionCacheManagerLocal

Author:
Joseph Marques

Constructor Summary
AlertConditionCacheManagerBean()
           
 
Method Summary
 AlertConditionCacheStats checkConditions(org.rhq.core.domain.measurement.Availability... availabilities)
          Since Availability is no longer a measurement, it must be checked differently.
 AlertConditionCacheStats checkConditions(org.rhq.core.domain.measurement.calltime.CallTimeData... callTimeData)
          A MeasurementReport is full of CallTimeData objects.
 AlertConditionCacheStats checkConditions(DriftChangeSetSummary driftChangeSetSummary)
          Drift changes that an agent reported.
 AlertConditionCacheStats checkConditions(org.rhq.core.domain.event.EventSource source, org.rhq.core.domain.event.Event... events)
          An EventReport is full of Event objects.
 AlertConditionCacheStats checkConditions(org.rhq.core.domain.measurement.MeasurementData... measurementData)
          A MeasurementReport is full of MeasurementData objects.
 AlertConditionCacheStats checkConditions(org.rhq.core.domain.operation.OperationHistory operationHistory)
          Operation history occurs in two distinct phases.
 AlertConditionCacheStats checkConditions(org.rhq.core.domain.configuration.ResourceConfigurationUpdate update)
          ResourceConfiguration changes can be made through the UI or on the managed resource.
 void reloadAllCaches()
           
 void reloadCachesForAgent(int agentId)
           
 void reloadGlobalCache()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlertConditionCacheManagerBean

public AlertConditionCacheManagerBean()
Method Detail

checkConditions

public AlertConditionCacheStats checkConditions(org.rhq.core.domain.measurement.MeasurementData... measurementData)
Description copied from interface: AlertConditionCacheManagerLocal
A MeasurementReport is full of MeasurementData objects. Each of these could potentially match against one of the cache's conditions. So, each must be checked against it, to see whether it fires against any of the conditions.

Specified by:
checkConditions in interface AlertConditionCacheManagerLocal
Returns:
the number of conditions that were true against this argument

checkConditions

public AlertConditionCacheStats checkConditions(org.rhq.core.domain.measurement.calltime.CallTimeData... callTimeData)
Description copied from interface: AlertConditionCacheManagerLocal
A MeasurementReport is full of CallTimeData objects. Each of these could potentially match against one of the cache's conditions. So, each must be checked against it, to see whether it fires against any of the conditions.

Specified by:
checkConditions in interface AlertConditionCacheManagerLocal
Returns:
the number of conditions that were true against this argument

checkConditions

public AlertConditionCacheStats checkConditions(org.rhq.core.domain.operation.OperationHistory operationHistory)
Description copied from interface: AlertConditionCacheManagerLocal
Operation history occurs in two distinct phases. The first is when the operation is first triggered. An OperationHistory element gets persisted whose status is INPROGRESS. The request is sent down to some agent that carries out the requested work. Each agent will send a response back out-of-band and update the operation accordingly. This method needs to be called in BOTH circumstances. Since the current implementation of the alerts subsystem allows you to generate an alert based on ANY of the valid states an operation can be in, we must check the conditions when the OperationHistory is in the only INPROGRESS state as well as any of the various 'resultant' states.

Specified by:
checkConditions in interface AlertConditionCacheManagerLocal
Returns:
the number of conditions that were true against this argument

checkConditions

public AlertConditionCacheStats checkConditions(org.rhq.core.domain.measurement.Availability... availabilities)
Description copied from interface: AlertConditionCacheManagerLocal
Since Availability is no longer a measurement, it must be checked differently. As a side note, since Availability is RLE users can ONLY be notified when the Availability changes. If the Availability for a resource doesn't change between two consecutive reports, this method can be safely called, but it will not trigger an event.

Specified by:
checkConditions in interface AlertConditionCacheManagerLocal
Returns:
the number of conditions that were true against this argument

checkConditions

public AlertConditionCacheStats checkConditions(org.rhq.core.domain.event.EventSource source,
                                                org.rhq.core.domain.event.Event... events)
Description copied from interface: AlertConditionCacheManagerLocal
An EventReport is full of Event objects. Each of these could potentially match against one of the cache's conditions. So, each must be checked against it, to see whether it fires against any of the conditions.

Specified by:
checkConditions in interface AlertConditionCacheManagerLocal
Returns:
the number of conditions that were true against this argument

checkConditions

public AlertConditionCacheStats checkConditions(org.rhq.core.domain.configuration.ResourceConfigurationUpdate update)
Description copied from interface: AlertConditionCacheManagerLocal
ResourceConfiguration changes can be made through the UI or on the managed resource. Whenever a new ResourceConfigurationUpdate is created, it should be passed to this method

Specified by:
checkConditions in interface AlertConditionCacheManagerLocal
Returns:
the number of conditions that were true against this argument

checkConditions

public AlertConditionCacheStats checkConditions(DriftChangeSetSummary driftChangeSetSummary)
Description copied from interface: AlertConditionCacheManagerLocal
Drift changes that an agent reported.

Specified by:
checkConditions in interface AlertConditionCacheManagerLocal
Parameters:
driftChangeSetSummary - data on the change set that is to be checked
Returns:
the number of conditions that were true against this argument

reloadCachesForAgent

public void reloadCachesForAgent(int agentId)
Specified by:
reloadCachesForAgent in interface AlertConditionCacheManagerLocal

reloadGlobalCache

public void reloadGlobalCache()
Specified by:
reloadGlobalCache in interface AlertConditionCacheManagerLocal

reloadAllCaches

public void reloadAllCaches()
Specified by:
reloadAllCaches in interface AlertConditionCacheManagerLocal


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.