Package org.opennms.netmgt.rtc
Class AvailabilityServiceHibernateImpl
- java.lang.Object
-
- org.opennms.netmgt.rtc.AvailabilityServiceHibernateImpl
-
- All Implemented Interfaces:
AvailabilityService
public class AvailabilityServiceHibernateImpl extends java.lang.Object implements AvailabilityService
This implementation of theAvailabilityService
uses database calls and stored procedures to calculate the availability percentages.- Author:
- Seth, Jesse White
-
-
Constructor Summary
Constructors Constructor Description AvailabilityServiceHibernateImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,RTCCategory>
getCategories()
Builds a map of configured categories, keyed by label.EuiLevel
getEuiLevel(RTCCategory category)
Optimized method for calculating the category statistics.
-
-
-
Method Detail
-
getCategories
public java.util.Map<java.lang.String,RTCCategory> getCategories()
Builds a map of configured categories, keyed by label.- Specified by:
getCategories
in interfaceAvailabilityService
- Returns:
- the categories
-
getEuiLevel
@Transactional(readOnly=true) public EuiLevel getEuiLevel(RTCCategory category)
Optimized method for calculating the category statistics. We start off by retrieving outages affecting the nodes and services in the given category, and group these by node id. Using the outages, we calculate node-level statistics and tally the values to calculate the category statistics.- Specified by:
getEuiLevel
in interfaceAvailabilityService
- Returns:
- a
EuiLevel
object.
-
-