class Ens.Util.MessagePurge extends Ens.Util.BitmapPurgeThis is the utility class to purge Message Headers and associated Message Bodies. The method to use is Purge. Multi thread purging depends on Work Queue Manager.
The Purge method supersedes the Purge method in Ens.MessageHeader class. ///
/// The caller of the Purge api requires SELECT privilege on the Ens.MessageHeader table.
classmethod Purge(Output pDeletedCount As %Integer, pDaysToKeep As %Integer = 7, pKeepIntegrity As %Boolean = 1, pBodiesToo As %Boolean = 0, pBitmapChunkLimit As %Integer = 500, ByRef pExtendedOptions As %String) as %Status
The Purge Method has the following parameters:
/* pDeletedCount - this is an array indicating how many message headers and bodies and bitmap extents have been deleted pDaysToKeep - this is used to calculate the non inclusive end date for the purge process. pKeepIntegrity - if true this is used to prevent the deletion of any messages within a session that is not considered 'Complete'. pBodiesToo - if true this means that the message bodies associated with the Message Headers are deleted. By default bodies are not deleted. Any bodies with a class definition that has Parameter ENSPURGE = 0 will not be deleted. pBitmapChunkLimit - this is an optional parameter to control the deletion of zeroed bitmap chunks pExtendedOptions - this is an array of giving extended options to refine the purging process. Subscripts can be: Restricting candidate messages other than 'pKeepIntegrity': "LimitToConfigItems" - a comma separated list of production host items that if defined will limit the purge to SourceConfigName or TargetConfigName contained in the list Multi-threaded: "WQCategory" - if defined then use Work Queue Manager using this category. If the category entered does not exist then the 'Default' category will be used. "WQBatchSize" - if WQBatchPeriodMinutes is not defined and using WQCategory then this gives the number of messages to split into multiple jobs (exclusive of completeness or config item name requirements) as starting batch lists - the minimum count applied will be 10,000. The default if neither WQBatchSize nor WQBatchPeriodMinutes is specified is a batch size of 100,000 "WQBatchPeriodMinutes" - if defined and using WQCategory this is the time interval to split into multiple jobs. - the minimum interval applied will be 15 (minutes) Used by multi-thread framework but available to pass in initial call "StartDateTime" and "DoNotDeleteEndDateTime" - optional UTC TimeStamps that override parameter pDaysToKeep Internal subscripts: "isWQJob" - this is an internal subscript used to identify the purge process as a spawned Work Queue job "masterPurgeJob" - this is an internal subscript used to identify master purge process that requested Work Queue submissions. Used to coordinate delete counts */
classmethod PurgeUsingWorkQueue(Output pDeletedCount As %Integer, pDaysToKeep As %Integer = 7, pKeepIntegrity As %Boolean = 1, pBodiesToo As %Boolean = 0, pBitmapChunkLimit As %Integer = 500, ByRef pExtendedOptions As %String) as %Status
This method is intended to be called from Purge() and not called directly