Class AlarmHistoryRestServiceImpl

    • Constructor Detail

      • AlarmHistoryRestServiceImpl

        public AlarmHistoryRestServiceImpl​(AlarmHistoryRepository alarmHistoryRepository)
    • Method Detail

      • getAlarm

        public AlarmState getAlarm​(String alarmId,
                                   String matchType,
                                   Long time)
        Description copied from interface: AlarmHistoryRestService
        Retrieve the last known state of an alarm at the given time.
        Specified by:
        getAlarm in interface AlarmHistoryRestService
        Parameters:
        alarmId - alarm id to query
        matchType - when set the 'reduction-key', lookup by reduction key instead of alarm id
        time - timestamp in milliseconds - defaults to "now" when null
        Returns:
        last known state
      • getActiveAlarmsAt

        public Collection<AlarmState> getActiveAlarmsAt​(Long time)
        Description copied from interface: AlarmHistoryRestService
        Retrieve the last known state of all alarms which were active at the given time.
        Specified by:
        getActiveAlarmsAt in interface AlarmHistoryRestService
        Parameters:
        time - timestamp in milliseconds
        Returns:
        last known state of all alarms which were active at the given time - defaults to "now" when null