Class Reference
IRIS for UNIX 2024.1.2
InterSystems: The power behind what matters   
Documentation  Search
  [USER] >  [Ens] >  [Alarm]
Private  Storage   

class Ens.Alarm extends Ens.Host

The Ens.Alarm code is designed for use in a single process, so users should ensure that they do not configure Ens.Alarm to run with a PoolSize greater than 1.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
4 10


Summary

Properties
%ConfigName %ConfigQueueName %LastActionTime %LastHandledTime
%LastReportedError %QuitTask %SessionId %SuperSession
%WarnedLatest %isShadow Adapter AlertGroups
AlertOnError BusinessPartner InactivityTimeout ThrottleDelay

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OnClose %OnNew
%OriginalNamespace %PackageName %RemoveFromSaveSet %SerializeObject
%SetModified %SuperSessionSet %ValidateObject AdapterName
AddAlarm CheckAlarmTasks GenerateSuperSession GetDeferredResponseToken
GetMsgHdrRequestKey GetProductionSettingValue GetProductionSettings GetPropertyConnections
GetShadowInstance InterruptAlarm MessageHeaderHandler OnGenerateSuperSession
OnGetConnections OnInit OnKeepalive OnMonitor
OnProductionStart OnProductionStop OnTask OnTearDown
QueueName RemoveAlarm RemoveAlarmFromRequestor SendDeferredResponse
SendRequestSync SuspendAlarms


Parameters

• parameter DOMAIN = "Ensemble";
• parameter INVOCATION = "Queue";
2 modes: Queue, InProc
• parameter LOCKTIMEOUT = 2;
Lock timeout used when adding data to the main $$$EnsAlarm global.
• parameter RECOVERYLOCKTIMEOUT = 10;
Lock timeout used when moving data into or out of a suspended state.

Methods

• method AddAlarm(pWakeTime As %String, pRequestHeaderId As %Integer, pAlarmHandle As %Integer, pDiscardOnShutdown As %Integer = 0, pIsInterrupted As %Boolean = 0) as %Status
Helper method to correctly add an alarm. The main data is stored in ^Ens.Alarm, and the ^||ISC.Ens.Alarm process-private global is used to store index data to avoid local memory exhaustion. The ^Ens.Alarm data stores the main data for the request subscripted by the AlarmRequest ID. Two subscripts in the PPG are used to index the data. The "Time" subscript is an index based on the requested wakeup time. The "Interrupt" index is an index for items that have received interrupt requests.
• method CheckAlarmTasks(Output pResponseHeader As Ens.MessageHeader, Output pTimeToNextEvent As %Integer, Output pResponseHandle As %Integer)
• method InterruptAlarm(pAlarmHandle As %Integer = -1) as %Status
Helper method to mark an alarm as interrupted.
• method MessageHeaderHandler(pRequestHeader As Ens.MessageHeader, Output pResponseHeader As Ens.MessageHeader) as %Status
• method OnInit() as %Status
Load any suspended tasks from $$$EnsSuspendedAppData when this config item is started. Note that only one config item will receive ALL previously suspended tasks.
• method OnTask() as %Status
Event loop for Actor and BusinessOperation. This is called only when INVOCATION is Queue.
• method OnTearDown() as %Status
This method previously ran the code that is now in SuspendAlarms(), but that code is now invoked from Ens.Director during production shutdown.
• method RemoveAlarm(pAlarmHandle As %Integer = -1, pTimeIndexUsedForAlamHandle As %String = "") as %Status
Helper method to correctly remove an alarm.
• classmethod RemoveAlarmFromRequestor(pRequestHeaderId As %Integer) as %Status
Helper method to remove DiscardOnShutdown alarm request from requestor.
• classmethod SuspendAlarms() as %Status
Move Alarm data from ^Ens.Alarm to ^Ens.SuspendedAppData("Ens.Alarm"). Note that requests with DiscardOnShutdown=1 will not be suspended.


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.