public class Outage extends Object
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
String |
toString()
Returns the outage information in date format.
|
public Outage()
public Outage(long svcLost)
svcLost
- Time at which the service is lost.public Outage(long svcLost, long svcRegained)
svcLost
- Time at which the service is lost.svcRegained
- Time at which the service is regained.public void setLostTime(long losttime)
losttime
- Time at which the service is lost.public void setRegainedTime(long regainedtime)
regainedtime
- Time at which the service is regained.public long getLostTime()
public long getRegainedTime()
public long getDownTime(long curTime, long rollingWindow)
curTime
- Time denoting end of rolling window (milliseconds).rollingWindow
- Rolling Window (milliseconds)Copyright © 2016. All rights reserved.