Skip to main content

%ZEN.Mojo.ActivityLog.Summarizer

This class summarizes the events within and Activity log into a summary that can be used for reporting. (You could refer to this as reducing the map provided by the Activity log.)
Applications may subclass this to create custom summaries. In this case, use the %SetSummarizerClass method in %ZEN.Mojo.ActivityLog.Utils.

Property Inventory

Method Inventory

Parameters

parameter DATAGLOBAL = ^ISC.ZenMojo.ActivityLog;
parameter LOCKTIMEOUT = 1;
Control the amount of time the summarizer code will wait for a lock on the summary data before timing out and assuming another process is currently working on the underlying data.
parameter SUMMARYNAME;
Subclasses MUST specify a valid SUMMARYNAME. This will be the value used in the underlying data storage.
parameter UPDATERANGE = 300;
Control the range in seconds for which we will allow the summary to be marked as up-to-date.

Properties

property %Application as %String;
The name of the application we are summarizing.
Property methods: %ApplicationDisplayToLogical(), %ApplicationGet(), %ApplicationIsValid(), %ApplicationLogicalToDisplay(), %ApplicationLogicalToOdbc(), %ApplicationNormalize(), %ApplicationSet()
property %Period as %Integer;
The period number we are currently summarizing.
Property methods: %PeriodDisplayToLogical(), %PeriodGet(), %PeriodIsValid(), %PeriodLogicalToDisplay(), %PeriodNormalize(), %PeriodSet()

Methods

method %Cleanup() as %Status
classmethod %GetDateTime(pPeriod As %Integer = 0) as %String
Callback to convert a period number into a $horolog-formatted timestamp value.
classmethod %GetLastUpdate(pAppName As %String, pPeriod As %Integer = 0) as %String
classmethod %GetNextPeriod(pAppName As %String, pPeriod As %Integer = "") as %Integer
Helper method to return the next period for the summarizer to work on.
classmethod %GetPeriod(pDateTime As %String = $horolog) as %Integer
Callback to supply an integer representing the period for the $horolog-formatted pDateTime.
classmethod %GetTimestamp(pPeriod As %Integer = 0) as %TimeStamp
Callback to convert a period number into an ODBC-format timestamp.
classmethod %IsSummaryUpToDate(pAppName As %String, pPeriod As %Integer = 0) as %Boolean
Check if the summary for the given time period is up-to-date.
method %OnAfterSummarize() as %Status
Perform any cleanup steps for the given period. This can be overridden by subclasses.
method %OnBeforeSummarize() as %Status
Perform any initialization steps for the given period before starting the summarization. This can be overridden by subclasses.
classmethod %OnKillLog(pAppName As %String) as %Status
Notification that the activity log for the application has been killed. By default this clears out the data under the summary global for this application.
method %ProcessEntry(pIndex As %Integer, pData As %List) as %Status
classmethod %SummarizePeriod(pAppName As %String = "", pPeriod As %Integer = 0, ByRef pLogCount As %Integer, pReportLockError As %Boolean = 0, pImmediateRelease As %Boolean = 0) as %Status
Compute summary information for the given period. For the base implementation, each period corresponds to one hour.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab