Package org.onosproject.alarm
Interface AlarmService
- 
- All Superinterfaces:
 ListenerService<AlarmEvent,AlarmListener>
public interface AlarmService extends ListenerService<AlarmEvent,AlarmListener>
Service for interacting with the alarm handling of devices. Unless stated otherwise, getter methods return active AND recently-cleared alarms. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Set<Alarm>getActiveAlarms()Returns all of the ACTIVE alarms.default Set<Alarm>getActiveAlarms(DeviceId deviceId)Returns all of the ACTIVE alarms for a specific device.AlarmgetAlarm(AlarmId alarmId)Returns the alarm with the specified identifier.Map<Alarm.SeverityLevel,Long>getAlarmCounts()Returns summary of alarms on all devices.Map<Alarm.SeverityLevel,Long>getAlarmCounts(DeviceId deviceId)Returns summary of alarms on a given device.Set<Alarm>getAlarms()Returns all of the alarms.Set<Alarm>getAlarms(Alarm.SeverityLevel severity)Returns the alarms with the specified severity.Set<Alarm>getAlarms(DeviceId deviceId)Returns the alarm matching a given device, regardless of source within that device.Set<Alarm>getAlarms(DeviceId deviceId, AlarmEntityId source)Returns the alarm for a given device and source.Set<Alarm>getAlarmsForFlow(DeviceId deviceId, long flowId)Returns the alarm affecting a given flow.Set<Alarm>getAlarmsForLink(ConnectPoint src, ConnectPoint dst)Returns the alarm affecting a given link.voidremove(AlarmId id)Remove an alarm from ONOS.AlarmupdateBookkeepingFields(AlarmId id, boolean clear, boolean isAcknowledged, String assignedUser)Update book-keeping (ie administrative) fields for the alarm matching the specified identifier.- 
Methods inherited from interface org.onosproject.event.ListenerService
addListener, removeListener 
 - 
 
 - 
 
- 
- 
Method Detail
- 
updateBookkeepingFields
Alarm updateBookkeepingFields(AlarmId id, boolean clear, boolean isAcknowledged, String assignedUser)
Update book-keeping (ie administrative) fields for the alarm matching the specified identifier.- Parameters:
 id- alarm identifierclear- true if the alarm has to be clearedisAcknowledged- new acknowledged stateassignedUser- new assigned user, null clear- Returns:
 - updated alarm (including any recent device-derived changes)
 
 
- 
remove
void remove(AlarmId id)
Remove an alarm from ONOS.- Parameters:
 id- alarm
 
- 
getAlarmCounts
Map<Alarm.SeverityLevel,Long> getAlarmCounts(DeviceId deviceId)
Returns summary of alarms on a given device.- Parameters:
 deviceId- the device- Returns:
 - map of severity (if applicable) vs alarm counts; empty map if either the device has no alarms or identified device is not managed.
 
 
- 
getAlarmCounts
Map<Alarm.SeverityLevel,Long> getAlarmCounts()
Returns summary of alarms on all devices.- Returns:
 - map of severity (if applicable) vs alarm counts; empty map if no alarms.
 
 
- 
getAlarm
Alarm getAlarm(AlarmId alarmId)
Returns the alarm with the specified identifier.- Parameters:
 alarmId- alarm identifier- Returns:
 - alarm matching id; null if no alarm matches the identifier.
 
 
- 
getAlarms
Set<Alarm> getAlarms()
Returns all of the alarms.- Returns:
 - set of alarms; empty set if no alarms
 
 
- 
getActiveAlarms
Set<Alarm> getActiveAlarms()
Returns all of the ACTIVE alarms. Recently cleared alarms excluded.- Returns:
 - set of alarms; empty set if no alarms
 
 
- 
getAlarms
Set<Alarm> getAlarms(Alarm.SeverityLevel severity)
Returns the alarms with the specified severity.- Parameters:
 severity- the alarm severity- Returns:
 - set of alarms with a particular severity; empty set if no alarms
 
 
- 
getAlarms
Set<Alarm> getAlarms(DeviceId deviceId)
Returns the alarm matching a given device, regardless of source within that device.- Parameters:
 deviceId- the device to use when searching alarms.- Returns:
 - set of alarms; empty set if no alarms
 
 
- 
getActiveAlarms
default Set<Alarm> getActiveAlarms(DeviceId deviceId)
Returns all of the ACTIVE alarms for a specific device. Recently cleared alarms excluded.- Parameters:
 deviceId- the device to use when searching alarms.- Returns:
 - set of alarms; empty set if no alarms
 
 
- 
getAlarms
Set<Alarm> getAlarms(DeviceId deviceId, AlarmEntityId source)
Returns the alarm for a given device and source.- Parameters:
 deviceId- the devicesource- the source within the device- Returns:
 - set of alarms; empty set if no alarms
 
 
- 
getAlarmsForLink
Set<Alarm> getAlarmsForLink(ConnectPoint src, ConnectPoint dst)
Returns the alarm affecting a given link.- Parameters:
 src- one end of the linkdst- one end of the link- Returns:
 - set of alarms; empty set if no alarms
 
 
 - 
 
 -