Skip to main content

SYS.Database.BackgroundDefragment

Class SYS.Database.BackgroundDefragment Extends %SYS.BackgroundTask

Class to start, monitor and control the Database Defragmentation utiltity running in the background. The method run in the background is the Defragment method of SYS.Database.

To start it

set oref=##class(SYS.Database.BackgroundDefragment).Start(Directory)

See the FileCompact method of SYS.Database for description of the parameters above.

Start returns an oref to an object of this class that can be inspected and reloaded to get status and progress updates. See superclass %SYS.BackgroundTask for detailed information on features of this object.

Parameters

CANCELDISPOSITION

Parameter CANCELDISPOSITION = -1;

Disposition for cancel requests.

0 - not allowed
1 - polls for cancel requests
-1 - directly terminate the process

Properties

Database

Property Database As %SysPath;

Database directory on which to operate

Methods

Execute

Method Execute(dir) As %Status [ Internal, Private ]

OnStarting

Method OnStarting(dir) As %Status [ Internal, Private ]

GetDisplayInfo

ClassMethod GetDisplayInfo(Output array) As %List [ Internal ]