public interface AlarmHistoryRepository
Modifier and Type | Method and Description |
---|---|
List<AlarmState> |
getActiveAlarmsAt(long time)
Retrieves the last known state of alarms which were active (and not yet deleted) at the given time.
|
List<AlarmState> |
getActiveAlarmsNow()
Retrieves the last known state of alarms which are currently active (and not yet deleted).
|
Optional<AlarmState> |
getAlarmWithDbIdAt(long id,
long time)
Retrieves the last known state of the alarm with the given database id, at or before the given time.
|
Optional<AlarmState> |
getAlarmWithReductionKeyIdAt(String reductionKey,
long time)
Similar to
getAlarmWithDbIdAt(long, long) , except the lookup is performed using the reduction key. |
List<AlarmState> |
getLastStateOfAllAlarms(long start,
long end)
Retrieves the last known state of all alarms which were recorded
in the given time period.
|
long |
getNumActiveAlarmsAt(long time)
Retrieves the number of alarms which were active at the given time.
|
long |
getNumActiveAlarmsNow()
Retrieves the number of alarms which are currently active.
|
List<AlarmState> |
getStatesForAlarmWithDbId(long id)
Retrieves all the known states for the alarm with the given database id.
|
List<AlarmState> |
getStatesForAlarmWithReductionKey(String reductionKey)
Retrieves all the known states for the alarm with the given database reduction key.
|
Optional<AlarmState> getAlarmWithDbIdAt(long id, long time)
AlarmState.getDeletedTime()
.id
- database id of the alarm to querytime
- timestamps in millisecondsOptional
if none was foundOptional<AlarmState> getAlarmWithReductionKeyIdAt(String reductionKey, long time)
getAlarmWithDbIdAt(long, long)
, except the lookup is performed using the reduction key.reductionKey
- reduction key of the alarm to querytime
- timestamps in millisecondsOptional
if none was foundList<AlarmState> getStatesForAlarmWithDbId(long id)
id
- database id of the alarm to queryList<AlarmState> getStatesForAlarmWithReductionKey(String reductionKey)
reductionKey
- reduction key of the alarm to queryList<AlarmState> getActiveAlarmsAt(long time)
time
- timestamp in millisecondsList<AlarmState> getLastStateOfAllAlarms(long start, long end)
start
- timestamp in milliseconds (inclusive)end
- timestamp in milliseconds (inclusive)long getNumActiveAlarmsAt(long time)
time
- timestamp in millisecondsList<AlarmState> getActiveAlarmsNow()
long getNumActiveAlarmsNow()
Copyright © 2020. All rights reserved.