OpenNMS API 1.2.3

org.opennms.report.datablock
Class Outage

java.lang.Object
  extended byorg.opennms.report.datablock.Outage

public class Outage
extends java.lang.Object

This class holds the service lost and regained time pair for the node/ipaddr/service combination.

Author:
Jacinta Remedios , Oculan Corp

Field Summary
private static java.lang.String LOG4J_CATEGORY
          The log4j category used to log debug messsages and statements.
private  long m_svcLostTime
          Time at which the service was lost.
private  long m_svcRegainedTime
          Time at which service was regained.
 
Constructor Summary
Outage()
          Default Constructor.
Outage(long svcLost)
          Constructor that sets the lost time.
Outage(long svcLost, long svcRegained)
          Constructor that sets the service 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 regained time
 void setLostTime(long losttime)
          Set the Lost time
 void setRegainedTime(long regainedtime)
          Set the regained time.
 java.lang.String toString()
          Returns the outage information in date format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG4J_CATEGORY

private static final java.lang.String LOG4J_CATEGORY
The log4j category used to log debug messsages and statements.

See Also:
Constant Field Values

m_svcLostTime

private long m_svcLostTime
Time at which the service was lost.


m_svcRegainedTime

private long m_svcRegainedTime
Time at which service was regained.

Constructor Detail

Outage

public Outage()
Default Constructor.


Outage

public Outage(long svcLost)
Constructor that sets the lost time.

Parameters:
svcLost - Time at which the service is lost.

Outage

public Outage(long svcLost,
              long svcRegained)
Constructor that sets the service lost and regained times.

Parameters:
svcLost - Time at which the service is lost.
svcRegained - Time at which the service is regained.
Method Detail

setLostTime

public void setLostTime(long losttime)
Set the Lost time

Parameters:
losttime - Time at which the service is lost.

setRegainedTime

public void setRegainedTime(long regainedtime)
Set the regained time.

Parameters:
regainedtime - Time at which the service is regained.

getLostTime

public long getLostTime()
Return the service lost time

Returns:
the service lost time.

getRegainedTime

public long getRegainedTime()
Return the regained time

Returns:
the service regained time.

getDownTime

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

Parameters:
curTime - Time denoting end of rolling window (milliseconds).
rollingWindow - Rolling Window (milliseconds)
Returns:
the downtime (difference between the regained and lost times) in the last rolling window

toString

public java.lang.String toString()
Returns the outage information in date format.


OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.