Skip to main content

EMS.Service.Namespace

SQL Table Name: EMS_Service.Namespace

Namespace class handler for the EMS Instance Note that this inherits from the Config Service as they were originally combined and Config uses some specific methods for fetch/saving the data in the %SYS Config.* package.

Property Inventory

Method Inventory

Properties

property DataMoveGroup as %String;
Remember Group which started DataMove in case Instance is moved.
Property methods: DataMoveGroupDisplayToLogical(), DataMoveGroupGet(), DataMoveGroupGetStored(), DataMoveGroupIsValid(), DataMoveGroupLogicalToDisplay(), DataMoveGroupLogicalToOdbc(), DataMoveGroupNormalize(), DataMoveGroupSet()
property DataMoveMirror as %String;
Mirror status of this Instance when the DataMove was started If an Instance becomes Primary or the Primary becomes the Backup, then the DataMove will error. The user must return all Instances to their original status and Restart the DataMove or Cancel it. Null ("") means no Mirror databases in DataMove, "1" means Primary, "0" means not Primary
Property methods: DataMoveMirrorDisplayToLogical(), DataMoveMirrorGet(), DataMoveMirrorGetStored(), DataMoveMirrorIsValid(), DataMoveMirrorLogicalToDisplay(), DataMoveMirrorLogicalToOdbc(), DataMoveMirrorNormalize(), DataMoveMirrorSet()
property DataMoveNewDatabases as list of %String;
Keep track of Databases created as part of DataMove, in case we have to rollback
Property methods: DataMoveNewDatabasesBuildValueArray(), DataMoveNewDatabasesCollectionToDisplay(), DataMoveNewDatabasesCollectionToOdbc(), DataMoveNewDatabasesDisplayToCollection(), DataMoveNewDatabasesDisplayToLogical(), DataMoveNewDatabasesGet(), DataMoveNewDatabasesGetObject(), DataMoveNewDatabasesGetObjectId(), DataMoveNewDatabasesGetStored(), DataMoveNewDatabasesGetSwizzled(), DataMoveNewDatabasesIsValid(), DataMoveNewDatabasesLogicalToDisplay(), DataMoveNewDatabasesLogicalToOdbc(), DataMoveNewDatabasesNormalize(), DataMoveNewDatabasesOdbcToCollection(), DataMoveNewDatabasesSet(), DataMoveNewDatabasesSetObject(), DataMoveNewDatabasesSetObjectId()
property DataMoveStop as %Boolean [ InitialExpression = 0 ];
Flag to stop the DataMove background job
Property methods: DataMoveStopDisplayToLogical(), DataMoveStopGet(), DataMoveStopGetStored(), DataMoveStopIsValid(), DataMoveStopLogicalToDisplay(), DataMoveStopNormalize(), DataMoveStopSet()
property DataMoveSyncId as %String;
Remember reporting object ID for last DataMove. This also serves as an indicator for PreActivate that the current Activation needs to handle a DataMove (in addition to the DataMove object exists).
Property methods: DataMoveSyncIdDisplayToLogical(), DataMoveSyncIdGet(), DataMoveSyncIdGetStored(), DataMoveSyncIdIsValid(), DataMoveSyncIdLogicalToDisplay(), DataMoveSyncIdLogicalToOdbc(), DataMoveSyncIdNormalize(), DataMoveSyncIdSet()
property SystemLock as %Boolean [ InitialExpression = 0 ];
Flag to indicate that a Namespace update is in a "critical" stage and has locked the system. This is used primarily for Namespace updates which affect multiple Instances. Instances which are stopped in this state may not be able to restart unless they first contact EM.
Property methods: SystemLockDisplayToLogical(), SystemLockGet(), SystemLockGetStored(), SystemLockIsValid(), SystemLockLogicalToDisplay(), SystemLockNormalize(), SystemLockSet()

Methods

method AddSpecialData(Stream As %Stream.GlobalBinary) as EMS.Error
Additional data that doesn't fit the generic ClassList handler can be added to the end of the DataToMessage stream here. Default is nothing, but used for Config and Mirror.
method CheckRequiredState(State As %String) as EMS.Error
Check any requirements before updating this Service. A 'state' string may be passed in EMS.ServiceMessageData.RequiredState. Normally none, mostly used by Mirror to check for Primary ('State'="Primary"). For Namespace, make sure any existing DataMoves are for this update
classmethod ClassList() as %List
A $List of all Classes included in the Namespace Service Note that Namespace classes are processed in this order, so any precedence can be specified here.
method DataMoveCancel(SyncId As %String) as EMS.Error
Rollback DataMove and remove the DataMove object.
classmethod DataMoveDelete(SyncId As %String, StreamId As %String)
JOB entry point. Access an existing DataMove object and call DeleteSrcGlobals(). Delete should also remove the DataMove object, as we're done with it. If this doesn't get called for some reason, then the Validate will check and clean up any old DataMove.
method DataMoveFinish()
Finish and delete DataMove object, and clear related properties
classmethod DataMoveJob(requestMessage As EMS.ServiceMessageContent) as EMS.Error
WebService call for DataMove validate/run/delete. Call JOB to handle operation.
classmethod DataMoveMirrorCheck(request As EMS.DataMessage) as EMS.DataMessage
Check to see if any Databases are an Async Mirror replicated Database
method DataMoveMirrorStatus(syncid) as EMS.Error
See if our Mirror status has changed. If so, return an error message.
classmethod DataMoveRead(Stream As %GlobalBinaryStream, ByRef RECORDS As %String) as EMS.Error
Extract an array of DataMove Ranges and Databases from a Stream of Service data RECORD(Class)=$list of property names RECORD(Class,IdKey)=$list of values
classmethod DataMoveRemove()
Clean up a DataMove if we've been removed from a Group/Service No errors or messages here, just rollback and delete.
classmethod DataMoveResponse(SyncId As %String, Status As %String, Error As EMS.Error, Operation As %String = "Run") as EMS.Error
Return a simple Status/Error response from DataMove jobs
classmethod DataMoveRun(SyncId As %String, StreamId As %String, Restart As %Integer = 0, Group As %String)
JOB entry point. Create a DataMove with Ranges and start the move (may have to create new Databases). Send progress reports to EM every 10 seconds during the intitial DataMove. Once it finishes the initial move, it will signal EM that Activate can be started, and continue running ApplyJournals() until the Activation is started. 'Restart' will be 0 initially. If 'Restart' = 1, then the DataMove.Run will be re-started (with the same DataMove object). If 'Restart'= 2, then we go to the ApplyJournals loop.
classmethod DataMoveSupported() as %Boolean
Check if DataMove supported on this Instance (2015.3 and later right now)
classmethod DataMoveValidate(SyncId As %String, StreamId As %String)
JOB entry point. Create a DataMove with Ranges. Validate and get Sizes Note that this checks and deletes any old DataMove objects, in case Validate has been called before or DataMoveDelete didn't get called for some reason.
classmethod ECPAppServers() as %List
Return a list of ECP AppServers which are connected to this system. An ECP DataServer must wait until AppServers are quiesced before setting SW10.
classmethod GetLocalizedName() as %String
Get the localized name of the service This method must be overridden for each service
method MessagePrefix(message) as EMS.Error
Handle any DataMoves in update Message
method PostActivate(success As %Boolean)
Cleanup or release locks after Activate Normally a no-op, Namespace releases SW10 here Errors will be reported here, but can't cause a rollback of changes
method PreActivate(LoadList As %List, ByRef Lock As %Boolean, SyncId As %String) as EMS.Error
Finish 'Prepare' or pre-Activation actions Normally a no-op, Namespace sets SW10 and does final DataMove catchup here

Inherited Members

Inherited Properties

Inherited Methods

Storage

Gray indicates storage defined by superclasses.

Storage Model: CacheStorage (EMS.Service.Base)

^SYS("EMS","ServiceD")(ID)
=
%%CLASSNAME
GroupName
Version
Enabled

Storage Model: CacheStorage (EMS.Service.Namespace)

^SYS("EMS","ServiceD")(ID,"Namespace")
=
DataMoveNewDatabases
DataMoveSyncId
DataMoveStop
DataMoveMirror
SystemLock
DataMoveGroup
FeedbackOpens in a new tab