Package org.yamcs.alarms
Class AbstractAlarmServer<S,T>
java.lang.Object
com.google.common.util.concurrent.AbstractService
org.yamcs.alarms.AbstractAlarmServer<S,T>
- All Implemented Interfaces:
com.google.common.util.concurrent.Service
- Direct Known Subclasses:
AbstractAlarmMirrorServer,AlarmServer
public abstract class AbstractAlarmServer<S,T>
extends com.google.common.util.concurrent.AbstractService
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service
com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<S,ActiveAlarm<T>> protected CopyOnWriteArrayList<AlarmListener<T>>protected final Logprotected final TimeServiceprotected final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidaddActiveAlarmFromTuple(Mdb mdb, Tuple t, Map<S, ActiveAlarm<T>> alarms) Map<S,ActiveAlarm<T>> addAlarmListener(AlarmListener<T> listener) Register for alarm noticesprotected abstract StringMap<S,ActiveAlarm<T>> Returns the current set of active alarmsprotected abstract Stringprotected abstract Stringprotected Objectprotected abstract SgetSubject(T value) protected voidloadAlarmsFromDb(double numDays, Map<S, ActiveAlarm<T>> alarms) voidremoveAlarmListener(AlarmListener<T> listener) Methods inherited from class com.google.common.util.concurrent.AbstractService
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, doCancelStart, doStart, doStop, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsync, toString
-
Field Details
-
log
-
yamcsInstance
-
timeService
-
activeAlarms
-
alarmListeners
-
-
Constructor Details
-
AbstractAlarmServer
-
-
Method Details
-
getActiveAlarms
Returns the current set of active alarms -
addAlarmListener
Register for alarm notices- Returns:
- the current set of active alarms
-
removeAlarmListener
-
loadAlarmsFromDb
-
getLock
-
addActiveAlarmFromTuple
-
getSubject
-
alarmTableName
-
getColNameLastEvent
-
getColNameSeverityIncreased
-