Package org.opennms.netmgt.poller
Class QueryManagerDaoImpl
- java.lang.Object
-
- org.opennms.netmgt.poller.QueryManagerDaoImpl
-
- All Implemented Interfaces:
QueryManager
public class QueryManagerDaoImpl extends java.lang.Object implements QueryManager
QueryManagerDaoImpl class.
- Author:
- brozow
-
-
Constructor Summary
Constructors Constructor Description QueryManagerDaoImpl()
-
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)
closeOutagesForInterfacevoid
closeOutagesForNode(java.util.Date closeDate, int eventId, int nodeId)
closeOutagesForNodevoid
closeOutagesForService(java.util.Date closeDate, int eventId, int nodeId, java.lang.String ipAddr, java.lang.String serviceName)
closeOutagesForServicevoid
closeOutagesForUnmanagedServices()
java.lang.String
getNodeLabel(int nodeId)
getNodeLabeljava.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)
-
-
-
Method Detail
-
getNodeLabel
public java.lang.String getNodeLabel(int nodeId)
getNodeLabel
- Specified by:
getNodeLabel
in interfaceQueryManager
- Parameters:
nodeId
- a int.- Returns:
- a
String
object.
-
getNodeLocation
public java.lang.String getNodeLocation(int nodeId)
- Specified by:
getNodeLocation
in interfaceQueryManager
-
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 interfaceQueryManager
-
updateOpenOutageWithEventId
public void updateOpenOutageWithEventId(int outageId, int lostEventId)
Set or updates the lost event id on the specified outage.- Specified by:
updateOpenOutageWithEventId
in interfaceQueryManager
-
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 interfaceQueryManager
-
updateResolvedOutageWithEventId
public void updateResolvedOutageWithEventId(int outageId, int regainedEventId)
Set or updates the regained event id on the specified outage.- Specified by:
updateResolvedOutageWithEventId
in interfaceQueryManager
-
getNodeServices
public java.util.List<java.lang.String[]> getNodeServices(int nodeId)
- Specified by:
getNodeServices
in interfaceQueryManager
- Returns:
-
closeOutagesForUnmanagedServices
public void closeOutagesForUnmanagedServices()
- Specified by:
closeOutagesForUnmanagedServices
in interfaceQueryManager
-
closeOutagesForNode
public void closeOutagesForNode(java.util.Date closeDate, int eventId, int nodeId)
closeOutagesForNode
- Specified by:
closeOutagesForNode
in interfaceQueryManager
- Parameters:
closeDate
- aDate
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 interfaceQueryManager
- Parameters:
closeDate
- aDate
object.eventId
- a int.nodeId
- a int.ipAddr
- aString
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 interfaceQueryManager
- Parameters:
closeDate
- aDate
object.eventId
- a int.nodeId
- a int.ipAddr
- aString
object.serviceName
- aString
object.
-
updateServiceStatus
public void updateServiceStatus(int nodeId, java.lang.String ipAddr, java.lang.String serviceName, java.lang.String status)
- Specified by:
updateServiceStatus
in interfaceQueryManager
-
updateLastGoodOrFail
public void updateLastGoodOrFail(int nodeId, java.net.InetAddress ipAddr, java.lang.String serviceName, PollStatus status)
- Specified by:
updateLastGoodOrFail
in interfaceQueryManager
-
-