Package gov.usgs.earthquake.distribution
Class HeartbeatStatus
- java.lang.Object
-
- gov.usgs.earthquake.distribution.HeartbeatStatus
-
public class HeartbeatStatus extends java.lang.Object
Heartbeat status information for a single component
-
-
Constructor Summary
Constructors Constructor Description HeartbeatStatus()
Create a new HeartbeatStatus.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearDataOlderThanDate(java.util.Date purgeDate)
Purge all heartbeatStatus data for this component older than given datejava.util.Map<java.lang.String,HeartbeatInfo>
getStatuses()
boolean
isEmpty()
javax.json.JsonObject
toJsonObject()
void
updateStatus(java.lang.String key, java.lang.String value)
Add or update a Heartbeat's key/value pair
-
-
-
Method Detail
-
updateStatus
public void updateStatus(java.lang.String key, java.lang.String value)
Add or update a Heartbeat's key/value pair- Parameters:
key
- String keyvalue
- String value of heartbeat info
-
getStatuses
public java.util.Map<java.lang.String,HeartbeatInfo> getStatuses()
- Returns:
- statuses - map of string, heartbeatInfo
-
isEmpty
public boolean isEmpty()
- Returns:
- boolean - checking statuses
-
clearDataOlderThanDate
public void clearDataOlderThanDate(java.util.Date purgeDate)
Purge all heartbeatStatus data for this component older than given date- Parameters:
purgeDate
- purge data until this date
-
toJsonObject
public javax.json.JsonObject toJsonObject()
- Returns:
- a JsonObject for output.
-
-