public class DataManager extends Object implements AvailabilityService, org.springframework.beans.factory.InitializingBean
| Constructor and Description | 
|---|
DataManager()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
afterPropertiesSet()
Constructor. 
 | 
void | 
assetInfoChanged(int nodeid)
assetInfoChanged 
 | 
Map<String,RTCCategory> | 
getCategories()
getCategories 
 | 
EuiLevel | 
getEuiLevel(RTCCategory category)
Retrieves the availability statistics for the given category 
 | 
Collection<Integer> | 
getNodes(RTCCategory category)  | 
int | 
getServiceCount(int nodeid,
               RTCCategory category)
Get the service count for the nodeid in the context of the passed
 category 
 | 
int | 
getServiceDownCount(int nodeid,
                   RTCCategory category)
Get the service down count for the nodeid in the context of the passed
 category 
 | 
double | 
getValue(int nodeid,
        RTCCategory category,
        long curTime,
        long rollingWindow)
Get the value(uptime) for the nodeid in the last 'rollingWindow' starting
 at current time in the context of the passed category 
 | 
double | 
getValue(RTCCategory category,
        long curTime,
        long rollingWindow)
Get the value(uptime) for the category in the last 'rollingWindow'
 starting at current time 
 | 
void | 
interfaceReparented(InetAddress ip,
                   int oldNodeId,
                   int newNodeId)
Reparent an interface. 
 | 
void | 
nodeCategoryMembershipChanged(int nodeid)
nodeCategoryMembershipChanged 
 | 
void | 
nodeGainedService(int nodeid,
                 InetAddress ip,
                 String svcName)
Handles a node gained service event. 
 | 
void | 
outageCreated(int nodeid,
             InetAddress ip,
             String svcName,
             long t)
Handles a node outage created event. 
 | 
void | 
outageResolved(int nodeid,
              InetAddress ip,
              String svcName,
              long t)
Handles a node outage resolved event. 
 | 
void | 
rtcNodeRescan(int nodeid)
Update the categories for a node. 
 | 
void | 
serviceDeleted(int nodeid,
              InetAddress ip,
              String svcName)
Remove node from the map and the categories on a 'serviceDeleted' event. 
 | 
public void afterPropertiesSet()
                        throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanSQLException - if there is an error reading initial data from the
                databaseFilterParseException - if a rule in the categories.xml was incorrectRTCException - if the initialization/data reading does not go throughSAXException - if any.IOException - if any.SQLException - if any.FilterParseException - if any.RTCException - if any.Exceptionpublic void nodeGainedService(int nodeid,
                              InetAddress ip,
                              String svcName)
nodeid - the node idip - the IP addresssvcName - the service namepublic void outageCreated(int nodeid,
                          InetAddress ip,
                          String svcName,
                          long t)
nodeid - the node idip - the IP addresssvcName - the service namet - the time at which service was lostpublic void outageResolved(int nodeid,
                           InetAddress ip,
                           String svcName,
                           long t)
nodeid - the node idip - the IP addresssvcName - the service namet - the time at which service was regainedpublic void serviceDeleted(int nodeid,
                           InetAddress ip,
                           String svcName)
nodeid - the nodeid on which service was deletedip - the ip on which service was deletedsvcName - the service that was deletedpublic void assetInfoChanged(int nodeid)
assetInfoChanged
nodeid - a long.public void nodeCategoryMembershipChanged(int nodeid)
nodeCategoryMembershipChanged
nodeid - a long.public void rtcNodeRescan(int nodeid)
                   throws SQLException,
                          FilterParseException,
                          RTCException
nodeid - the nodeid on which SNMP service was addedSQLException - if the database read fails due to an SQL errorFilterParseException - if filtering the data against the category rule fails due to
             the rule being incorrectRTCException - if the database read or filtering the data against the
             category rule fails for some reasonpublic void interfaceReparented(InetAddress ip, int oldNodeId, int newNodeId)
ip - the interface to reparentoldNodeId - the node that the IP belonged to earliernewNodeId - the node that the IP now belongs topublic double getValue(RTCCategory category, long curTime, long rollingWindow)
catLabel - the category to which the node should belong tocurTime - the current timerollingWindow - the window for which value is to be calculatedpublic double getValue(int nodeid,
                       RTCCategory category,
                       long curTime,
                       long rollingWindow)
nodeid - the node for which value is to be calculatedcatLabel - the category to which the node should belong tocurTime - the current timerollingWindow - the window for which value is to be calculatedpublic int getServiceCount(int nodeid,
                           RTCCategory category)
nodeid - the node for which service count is to be calculatedcatLabel - the category to which the node should belong topublic int getServiceDownCount(int nodeid,
                               RTCCategory category)
nodeid - the node for which service down count is to be calculatedcatLabel - the category to which the node should belong topublic Map<String,RTCCategory> getCategories()
getCategories
getCategories in interface AvailabilityServicepublic Collection<Integer> getNodes(RTCCategory category)
public EuiLevel getEuiLevel(RTCCategory category)
AvailabilityServicegetEuiLevel in interface AvailabilityServiceEuiLevel object.Copyright © 2021. All rights reserved.