
public final class RaisedAlertHistory extends Object implements Serializable
RaisedAlertInstance
objects created by calls to addAlertInstance(...) method.
This class is meant to be sent over the buses as part of a RaisedAlertSummary object.
The class is thread-safe as long as its instances are safely published.| Constructor and Description |
|---|
RaisedAlertHistory()
The main constructor of the RaisedAlert.
|
RaisedAlertHistory(RaisedAlertHistory other)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAlertInstance(AlertState severity,
Alert alert)
Add a new instance of this Alert.
|
void |
addAlertInstance(AlertState severity,
Alert alert,
long timestamp,
String cause)
Add a new instance of this Alert.
|
AlertState |
getHighestAlertState()
Get the highest AlertState raised for this Alert.
|
Alert |
getLatestAlert()
Get the original Alert that was raised.
|
AlertState |
getLatestAlertState()
Get the latest AlertState of this Alert.
|
long |
getLatestAlertTimestamp()
Get the latest CCS timestamp of this Alert.
|
int |
getNumberOfInstances()
Get the number of times this Alert was raised.
|
List<RaisedAlertInstance> |
getRaisedAlertInstancesList()
Get the full history of RaisedAlertInstances for this Alert.
|
String |
toString() |
public RaisedAlertHistory()
public RaisedAlertHistory(RaisedAlertHistory other)
other - Instance to be cloned.public Alert getLatestAlert()
public void addAlertInstance(AlertState severity, Alert alert, long timestamp, String cause)
severity - The AlertState of the Alert.alert - The Alert that was raised.timestamp - The CCS timestamp of when the Alert was raised.cause - The cause of the Alert.protected void addAlertInstance(AlertState severity, Alert alert)
severity - The AlertState of the Alert.alert - The Alert that was raised.public int getNumberOfInstances()
public AlertState getLatestAlertState()
public long getLatestAlertTimestamp()
public AlertState getHighestAlertState()
public List<RaisedAlertInstance> getRaisedAlertInstancesList()
Copyright © 2016 LSST. All rights reserved.