Packages

t

csw.alarm.api.scaladsl

AlarmAdminService

trait AlarmAdminService extends SeverityService with MetadataService with HealthService with StatusService

An AlarmAdminService interface to update and query alarms. All operations are non-blocking.

Linear Supertypes
StatusService, HealthService, MetadataService, SeverityService, AlarmService, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AlarmAdminService
  2. StatusService
  3. HealthService
  4. MetadataService
  5. SeverityService
  6. AlarmService
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def acknowledge(alarmKey: AlarmKey): Future[Done]

    Sets acknowledgement status to acknowledged

    Sets acknowledgement status to acknowledged

    alarmKey

    represents a unique alarm in alarm store

    returns

    a future which completes alarm is acknowledged successfully or fails with csw.alarm.api.exceptions.KeyNotFoundException

    Definition Classes
    StatusService
  2. abstract def getAggregatedHealth(key: Key): Future[AlarmHealth]

    Gets the aggregated health which is calculated based on the worst severity amongst all active alarms for the given alarm/component/subsystem/system

    Gets the aggregated health which is calculated based on the worst severity amongst all active alarms for the given alarm/component/subsystem/system

    key

    represents an alarm, component, subsystem or system

    returns

    a future which completes with aggregated health or fails with csw.alarm.api.exceptions.KeyNotFoundException or csw.alarm.api.exceptions.InactiveAlarmException

    Definition Classes
    HealthService
  3. abstract def getAggregatedSeverity(key: Key): Future[FullAlarmSeverity]

    Gets the aggregated severity which is calculated based on the worst severity amongst all active alarms for the given alarm/component/subsystem/system

    Gets the aggregated severity which is calculated based on the worst severity amongst all active alarms for the given alarm/component/subsystem/system

    key

    represents an alarm, component, subsystem or system

    returns

    a future which completes with aggregated severity or fails with csw.alarm.api.exceptions.KeyNotFoundException or csw.alarm.api.exceptions.InactiveAlarmException

    Definition Classes
    SeverityService
  4. abstract def getCurrentSeverity(alarmKey: AlarmKey): Future[FullAlarmSeverity]

    Fetches the severity of the given alarm from the alarm store

    Fetches the severity of the given alarm from the alarm store

    alarmKey

    represents a unique alarm in alarm store

    returns

    a future which completes with the alarm severity or fails with csw.alarm.api.exceptions.KeyNotFoundException

    Definition Classes
    SeverityService
  5. abstract def getMetadata(key: Key): Future[List[AlarmMetadata]]

    Fetches the metadata of all alarms which belong to the given component/subsystem/system

    Fetches the metadata of all alarms which belong to the given component/subsystem/system

    key

    represents component, subsystem or system

    returns

    a future which completes with the list of metadata for the given key or fails with csw.alarm.api.exceptions.KeyNotFoundException

    Definition Classes
    MetadataService
  6. abstract def getMetadata(alarmKey: AlarmKey): Future[AlarmMetadata]

    Fetches the metadata for the given alarm

    Fetches the metadata for the given alarm

    alarmKey

    represents a unique alarm in alarm store

    returns

    a future which completes with metadata or fails with csw.alarm.api.exceptions.KeyNotFoundException

    Definition Classes
    MetadataService
  7. abstract def getStatus(alarmKey: AlarmKey): Future[AlarmStatus]

    Fetches the status for the given alarm

    Fetches the status for the given alarm

    alarmKey

    represents a unique alarm in alarm store

    returns

    a future which completes with status or fails with csw.alarm.api.exceptions.KeyNotFoundException

    Definition Classes
    StatusService
  8. abstract def initAlarms(inputConfig: Config, reset: Boolean = false): Future[Done]

    Loads data for all alarms in alarm store i.e.

    Loads data for all alarms in alarm store i.e. metadata of alarms for e.g. subsystem, component, name, etc. and status of alarms for e.g. acknowledgement status, latch status, etc.

    inputConfig

    represents the data for all alarms to be loaded in alarm store

    reset

    the alarm store before loading the data

    returns

    a future which completes when data is loaded successfully in alarm store or fails with csw.alarm.api.exceptions.ConfigParseException

    Definition Classes
    MetadataService
    Note

    severity of the alarm is not loaded in store and is by default inferred as Disconnected until component starts updating severity

    See also

    csw.alarm.models.AlarmMetadata, csw.alarm.models.AlarmStatus

  9. abstract def latchToDisconnected(alarmKey: AlarmKey, currentSeverity: FullAlarmSeverity): Future[Done]

    Latches the severity to Disconnected.

    Latches the severity to Disconnected. Also updates the time to current time if alarm was not already latched to disconnected. Also, updates the acknowledgement status if required.

    alarmKey

    Key of the alarm which needs to be latched to Disconnected status

    currentSeverity

    current heartbeat severity of the alarm

    Definition Classes
    StatusService
    Note

    This method is expected to be called from alarm server when it receives removed event for any alarm

  10. abstract def reset(alarmKey: AlarmKey): Future[Done]

    Sets the latched severity to current severity and acknowledgement status to acknowledged for the given alarm

    Sets the latched severity to current severity and acknowledgement status to acknowledged for the given alarm

    alarmKey

    represents a unique alarm in alarm store

    returns

    a future which completes when alarm is reset successfully or fails with csw.alarm.api.exceptions.KeyNotFoundException

    Definition Classes
    StatusService
  11. abstract def setSeverity(key: AlarmKey, severity: AlarmSeverity): Future[Done]

    Sets the severity of an alarm.

    Sets the severity of an alarm. It also internally updates the latch severity and acknowledgement status. The severity is set in alarm store with a specific TTL (time to live). After the time passes for TTL, the severity will be automatically inferred as Disconnected.

    key

    represents a unique alarm in alarm store e.g nfiraos.trombone.tromboneaxislowlimitalarm

    severity

    represents the severity to be set for the alarm e.g. Okay, Warning, Major, Critical, etc

    returns

    a CompletableFuture which completes when the severity is successfully set in alarm store or fails with csw.alarm.api.exceptions.InvalidSeverityException or csw.alarm.api.exceptions.KeyNotFoundException

    Definition Classes
    AlarmService
    Note

    By default all alarms are loaded in alarm store as Disconnected. Once the component is up and working, it will be it's responsibility to update all it's alarms with appropriate severity and keep refreshing it.

  12. abstract def shelve(alarmKey: AlarmKey): Future[Done]

    Sets the shelve status of the given alarm to shelved

    Sets the shelve status of the given alarm to shelved

    alarmKey

    represents a unique alarm in alarm store

    returns

    a future which completes when alarm is shelved successfully or fails with csw.alarm.api.exceptions.KeyNotFoundException

    Definition Classes
    StatusService
    Note

    alarms that are shelved will automatically be unshelved at a specific time (currently configured at 8 AM local time) if not done explicitly. This time is configurable e.g csw-alarm.shelve-timeout = h:m:s a . Also, shelved alarms are considered in aggregation of the severity and health.

  13. abstract def subscribeAggregatedHealthActorRef(key: Key, actorRef: ActorRef[AlarmHealth]): AlarmSubscription

    Calculates the aggregated health for the given alarm/component/subsystem/system and sends to the give actor each time the aggregation changes

    Calculates the aggregated health for the given alarm/component/subsystem/system and sends to the give actor each time the aggregation changes

    key

    represents an alarm, component, subsystem or system

    actorRef

    receives the latest worst health

    returns

    alarm subscription which can be used to unsubscribe or check if subscription is ready to be consumed. The method can also throw csw.alarm.api.exceptions.KeyNotFoundException or csw.alarm.api.exceptions.InactiveAlarmException

    Definition Classes
    HealthService
    Note

    aggregated health is worst amongst all active alarms for given key

  14. abstract def subscribeAggregatedHealthCallback(key: Key, callback: (AlarmHealth) => Unit): AlarmSubscription

    Calculates the aggregated health for the given alarm/component/subsystem/system and executes the callback each time the aggregation changes

    Calculates the aggregated health for the given alarm/component/subsystem/system and executes the callback each time the aggregation changes

    key

    represents an alarm, component, subsystem or system

    callback

    executed with the latest worst health

    returns

    alarm subscription which can be used to unsubscribe or check if subscription is ready to be consumed. The method can also throw csw.alarm.api.exceptions.KeyNotFoundException or csw.alarm.api.exceptions.InactiveAlarmException

    Definition Classes
    HealthService
    Note

    Callbacks are not thread-safe on the JVM. If you need to do side effects/mutations, prefer using subscribeAggregatedHealthActorRef API.

    ,

    aggregated health is worst amongst all active alarms for given key

  15. abstract def subscribeAggregatedSeverityActorRef(key: Key, actorRef: ActorRef[FullAlarmSeverity]): AlarmSubscription

    Calculates the aggregated severity for the given alarm/component/subsystem/system and sends to the give actor each time the aggregation changes

    Calculates the aggregated severity for the given alarm/component/subsystem/system and sends to the give actor each time the aggregation changes

    key

    represents an alarm, component, subsystem or system

    actorRef

    receives the latest worst severity

    returns

    alarm subscription which can be used to unsubscribe or check if subscription is ready to be consumed. The method can also throw csw.alarm.api.exceptions.KeyNotFoundException or csw.alarm.api.exceptions.InactiveAlarmException

    Definition Classes
    SeverityService
    Note

    aggregated severity is worst amongst all active alarms for given key

  16. abstract def subscribeAggregatedSeverityCallback(key: Key, callback: (FullAlarmSeverity) => Unit): AlarmSubscription

    Calculates the aggregated severity for the given alarm/component/subsystem/system and executes the callback each time the aggregation changes

    Calculates the aggregated severity for the given alarm/component/subsystem/system and executes the callback each time the aggregation changes

    key

    represents an alarm, component, subsystem or system

    callback

    executed with the latest worst severity

    returns

    alarm subscription which can be used to unsubscribe or check if subscription is ready to be consumed. The method can also throw csw.alarm.api.exceptions.KeyNotFoundException or csw.alarm.api.exceptions.InactiveAlarmException

    Definition Classes
    SeverityService
    Note

    Callbacks are not thread-safe on the JVM. If you need to do side effects/mutations, prefer using subscribeAggregatedSeverityActorRef API.

    ,

    aggregated severity is worst amongst all active alarms for given key

  17. abstract def unshelve(alarmKey: AlarmKey): Future[Done]

    Sets the shelve status of the given alarm to unshelved

    Sets the shelve status of the given alarm to unshelved

    alarmKey

    represents a unique alarm in alarm store

    returns

    a future which completes when the alarm is unshelved successfully or fails with csw.alarm.api.exceptions.KeyNotFoundException

    Definition Classes
    StatusService

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from StatusService

Inherited from HealthService

Inherited from MetadataService

Inherited from SeverityService

Inherited from AlarmService

Inherited from AnyRef

Inherited from Any

Ungrouped