Class AvailabilityServiceHibernateImpl

  • All Implemented Interfaces:
    AvailabilityService

    public class AvailabilityServiceHibernateImpl
    extends java.lang.Object
    implements AvailabilityService
    This implementation of the AvailabilityService uses database calls and stored procedures to calculate the availability percentages.
    Author:
    Seth, Jesse White
    • Constructor Detail

      • AvailabilityServiceHibernateImpl

        public AvailabilityServiceHibernateImpl()
    • 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 interface AvailabilityService
        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 interface AvailabilityService
        Returns:
        a EuiLevel object.