Class QueryManagerDaoImpl

  • All Implemented Interfaces:
    QueryManager

    public class QueryManagerDaoImpl
    extends java.lang.Object
    implements QueryManager

    QueryManagerDaoImpl class.

    Author:
    brozow
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void closeOutagesForInterface​(java.util.Date closeDate, int eventId, int nodeId, java.lang.String ipAddr)
      closeOutagesForInterface
      void closeOutagesForNode​(java.util.Date closeDate, int eventId, int nodeId)
      closeOutagesForNode
      void closeOutagesForService​(java.util.Date closeDate, int eventId, int nodeId, java.lang.String ipAddr, java.lang.String serviceName)
      closeOutagesForService
      void closeOutagesForUnmanagedServices()  
      java.lang.String getNodeLabel​(int nodeId)
      getNodeLabel
      java.lang.String getNodeLocation​(int nodeId)
      java.util.List<java.lang.String[]> getNodeServices​(int nodeId)  
      java.lang.Integer openOutagePendingLostEventId​(int nodeId, java.lang.String ipAddr, java.lang.String svcName, java.util.Date lostTime)
      Creates a new outage for the given service without setting the lost event id.
      java.lang.Integer resolveOutagePendingRegainEventId​(int nodeId, java.lang.String ipAddr, java.lang.String svcName, java.util.Date regainedTime)
      Marks the outage for the given service as resolved with the given time and returns the id of this outage.
      void updateLastGoodOrFail​(int nodeId, java.net.InetAddress ipAddr, java.lang.String serviceName, PollStatus status)  
      void updateOpenOutageWithEventId​(int outageId, int lostEventId)
      Set or updates the lost event id on the specified outage.
      void updateResolvedOutageWithEventId​(int outageId, int regainedEventId)
      Set or updates the regained event id on the specified outage.
      void updateServiceStatus​(int nodeId, java.lang.String ipAddr, java.lang.String serviceName, java.lang.String status)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QueryManagerDaoImpl

        public QueryManagerDaoImpl()
    • Method Detail

      • getNodeLabel

        public java.lang.String getNodeLabel​(int nodeId)

        getNodeLabel

        Specified by:
        getNodeLabel in interface QueryManager
        Parameters:
        nodeId - a int.
        Returns:
        a String object.
      • openOutagePendingLostEventId

        public java.lang.Integer openOutagePendingLostEventId​(int nodeId,
                                                              java.lang.String ipAddr,
                                                              java.lang.String svcName,
                                                              java.util.Date lostTime)
        Creates a new outage for the given service without setting the lost event id.
        Specified by:
        openOutagePendingLostEventId in interface QueryManager
      • updateOpenOutageWithEventId

        public void updateOpenOutageWithEventId​(int outageId,
                                                int lostEventId)
        Set or updates the lost event id on the specified outage.
        Specified by:
        updateOpenOutageWithEventId in interface QueryManager
      • resolveOutagePendingRegainEventId

        public java.lang.Integer resolveOutagePendingRegainEventId​(int nodeId,
                                                                   java.lang.String ipAddr,
                                                                   java.lang.String svcName,
                                                                   java.util.Date regainedTime)
        Marks the outage for the given service as resolved with the given time and returns the id of this outage. If no outages are currently open, then no action is take and the function returns null.
        Specified by:
        resolveOutagePendingRegainEventId in interface QueryManager
      • updateResolvedOutageWithEventId

        public void updateResolvedOutageWithEventId​(int outageId,
                                                    int regainedEventId)
        Set or updates the regained event id on the specified outage.
        Specified by:
        updateResolvedOutageWithEventId in interface QueryManager
      • getNodeServices

        public java.util.List<java.lang.String[]> getNodeServices​(int nodeId)
        Specified by:
        getNodeServices in interface QueryManager
        Returns:
      • closeOutagesForNode

        public void closeOutagesForNode​(java.util.Date closeDate,
                                        int eventId,
                                        int nodeId)

        closeOutagesForNode

        Specified by:
        closeOutagesForNode in interface QueryManager
        Parameters:
        closeDate - a Date object.
        eventId - a int.
        nodeId - a int.
      • closeOutagesForInterface

        public void closeOutagesForInterface​(java.util.Date closeDate,
                                             int eventId,
                                             int nodeId,
                                             java.lang.String ipAddr)

        closeOutagesForInterface

        Specified by:
        closeOutagesForInterface in interface QueryManager
        Parameters:
        closeDate - a Date object.
        eventId - a int.
        nodeId - a int.
        ipAddr - a String object.
      • closeOutagesForService

        public void closeOutagesForService​(java.util.Date closeDate,
                                           int eventId,
                                           int nodeId,
                                           java.lang.String ipAddr,
                                           java.lang.String serviceName)

        closeOutagesForService

        Specified by:
        closeOutagesForService in interface QueryManager
        Parameters:
        closeDate - a Date object.
        eventId - a int.
        nodeId - a int.
        ipAddr - a String object.
        serviceName - a String object.
      • updateServiceStatus

        public void updateServiceStatus​(int nodeId,
                                        java.lang.String ipAddr,
                                        java.lang.String serviceName,
                                        java.lang.String status)
        Specified by:
        updateServiceStatus in interface QueryManager
      • updateLastGoodOrFail

        public void updateLastGoodOrFail​(int nodeId,
                                         java.net.InetAddress ipAddr,
                                         java.lang.String serviceName,
                                         PollStatus status)
        Specified by:
        updateLastGoodOrFail in interface QueryManager