Class AlarmHistoryRestServiceImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Collection<AlarmState> getActiveAlarmsAt​(java.lang.Long time)
      Retrieve the last known state of all alarms which were active at the given time.
      AlarmState getAlarm​(java.lang.String alarmId, java.lang.String matchType, java.lang.Long time)
      Retrieve the last known state of an alarm at the given time.
      java.util.Collection<AlarmState> getStatesForAlarm​(java.lang.String alarmId, java.lang.String matchType)
      Retrieve the complete set of state changes for the given alarm.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • REDUCTION_KEY_MATCH_TYPE

        public static final java.lang.String REDUCTION_KEY_MATCH_TYPE
        See Also:
        Constant Field Values
    • Constructor Detail

      • AlarmHistoryRestServiceImpl

        public AlarmHistoryRestServiceImpl​(AlarmHistoryRepository alarmHistoryRepository)
    • Method Detail

      • getStatesForAlarm

        public java.util.Collection<AlarmState> getStatesForAlarm​(java.lang.String alarmId,
                                                                  java.lang.String matchType)
        Description copied from interface: AlarmHistoryRestService
        Retrieve the complete set of state changes for the given alarm.
        Specified by:
        getStatesForAlarm in interface AlarmHistoryRestService
        Parameters:
        alarmId - alarm id to query
        matchType - when set the 'reduction-key', lookup by reduction key instead of alarm id
        Returns:
        state changes
      • getAlarm

        public AlarmState getAlarm​(java.lang.String alarmId,
                                   java.lang.String matchType,
                                   java.lang.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 java.util.Collection<AlarmState> getActiveAlarmsAt​(java.lang.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