org.opennms.netmgt.rtc.datablock
Class RTCNodeSvcTime

java.lang.Object
  extended by org.opennms.netmgt.rtc.datablock.RTCNodeSvcTime

public class RTCNodeSvcTime
extends Object

This contains a service lost/regained set/pair for the node - i.e each service lost time and the corresponding service regained time

Author:
Sowmya Kumaraswamy , OpenNMS.org

Constructor Summary
RTCNodeSvcTime()
          Default constructor - initilializes the values
RTCNodeSvcTime(long lostt)
          Creates a time with the lost time
RTCNodeSvcTime(long lostt, long regainedt)
          Creates the service time with both the lost and regained times
 
Method Summary
 long getDownTime(long curTime, long rollingWindow)
          Return the downtime (difference between the regained and lost times) in the last rolling window
 long getLostTime()
          Return the service lost time
 long getRegainedTime()
          Return the service regained time
 boolean hasExpired(long startOfRollingWindow)
          Return if this outages has expired
 void setLostTime(long t)
          Set the service lost time
 void setRegainedTime(long t)
          Set the service regained time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RTCNodeSvcTime

public RTCNodeSvcTime()
Default constructor - initilializes the values


RTCNodeSvcTime

public RTCNodeSvcTime(long lostt)
Creates a time with the lost time

Parameters:
lostt - the time at which service was lost

RTCNodeSvcTime

public RTCNodeSvcTime(long lostt,
                      long regainedt)
Creates the service time with both the lost and regained times

Parameters:
lostt - the time at which service was lost
regainedt - the time at which service was regained
Method Detail

setLostTime

public void setLostTime(long t)
Set the service lost time

Parameters:
t - the time at which service was lost

setRegainedTime

public void setRegainedTime(long t)
Set the service regained time

Parameters:
t - the time at which service was regained

getLostTime

public long getLostTime()
Return the service lost time

Returns:
the service lost time

getRegainedTime

public long getRegainedTime()
Return the service regained time

Returns:
the service regained time

hasExpired

public boolean hasExpired(long startOfRollingWindow)
Return if this outages has expired

Returns:
if this outages has expired

getDownTime

public long getDownTime(long curTime,
                        long rollingWindow)
Return the downtime (difference between the regained and lost times) in the last rolling window

Returns:
the downtime (difference between the regained and lost times) in the last rolling window


Copyright © 2009. All Rights Reserved.