public class AlarmHistoryRestServiceImpl extends Object implements AlarmHistoryRestService
Modifier and Type | Field and Description |
---|---|
static String |
REDUCTION_KEY_MATCH_TYPE |
Constructor and Description |
---|
AlarmHistoryRestServiceImpl(AlarmHistoryRepository alarmHistoryRepository) |
Modifier and Type | Method and Description |
---|---|
Collection<AlarmState> |
getActiveAlarmsAt(Long time)
Retrieve the last known state of all alarms which were active at the given time.
|
AlarmState |
getAlarm(String alarmId,
String matchType,
Long time)
Retrieve the last known state of an alarm at the given time.
|
Collection<AlarmState> |
getStatesForAlarm(String alarmId,
String matchType)
Retrieve the complete set of state changes for the given alarm.
|
public static final String REDUCTION_KEY_MATCH_TYPE
public AlarmHistoryRestServiceImpl(AlarmHistoryRepository alarmHistoryRepository)
public Collection<AlarmState> getStatesForAlarm(String alarmId, String matchType)
AlarmHistoryRestService
getStatesForAlarm
in interface AlarmHistoryRestService
alarmId
- alarm id to querymatchType
- when set the 'reduction-key', lookup by reduction key instead of alarm idpublic AlarmState getAlarm(String alarmId, String matchType, Long time)
AlarmHistoryRestService
getAlarm
in interface AlarmHistoryRestService
alarmId
- alarm id to querymatchType
- when set the 'reduction-key', lookup by reduction key instead of alarm idtime
- timestamp in milliseconds - defaults to "now" when nullpublic Collection<AlarmState> getActiveAlarmsAt(Long time)
AlarmHistoryRestService
getActiveAlarmsAt
in interface AlarmHistoryRestService
time
- timestamp in millisecondsCopyright © 2020. All rights reserved.