Class Reference
IRIS for UNIX 2019.1
InterSystems: The power behind what matters   
Documentation  Search
  [%SYS] >  [Config] >  [MirrorMember]
Private  Storage   

persistent class Config.MirrorMember extends %Persistent, Config.CommonSingleMethods, Config.CommonProperties, %SYSTEM.Help

This class allows you to modify and view the [MirrorMember] section of the CPF file through programatic APIs. While properties are usually modified through the System Management portal, there may be some occasion where modifying them through the API's is best for your system. In all the Config methods, if you do not specify the CPFFile parameter, the currently active CPF file is used. If you wish to modify a CPF file which is not the currently active one, then specify the CPFFile you wish to modify in the method call.
The Flags parameter does not normally need to be specified; the defaults are usually sufficient for most cases.
You can use either the provided API's (Get/Modify) to modify the properties by passing in the correct parameters, or use Object sytax to open and directly manipulate the config objects.

EXAMPLE:

; Use class methods to modify properties
%SYS>s Status=##Class(Config.MirrorMember).Get(.Properties)
%SYS>i 'Status w !,"Error="_$SYSTEM.Status.GetErrorText(Status)
%SYS>zw Properties("SystemName")
Properties("SystemName")="Mirror5"
%STS>s Properties("SystemName")="Mirror6"
%SYS>s Status=##Class(Config.MirrorMember).Modify(.Properties)
%SYS>i 'Status w !,"Error="_$SYSTEM.Status.GetErrorText(Status)
; Now use Objects to modify properties
%SYS>s Obj=##Class(Config.MirrorMember).Open()
%SYS>w Obj.SystemName
Mirror6
%SYS>s Obj.SystemName="Mirror7"
%SYS>s Status=Obj.%Save()
%SYS>i 'Status w !,"Error="_$SYSTEM.Status.GetErrorText(Status)

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 12 14 1


Summary

Properties
AgentAddress AsyncMemberGUID AsyncMemberType AsyncUseSystemPurgeInterval
CPFFile Comments Flags JoinMirror
Name SystemName VirtualAddressInterface

Methods
%AddToSaveSet %AddToSyncSet %BMEBuilt %CheckConstraints
%CheckConstraintsForExtent %ClassIsLatestVersion %ClassName %ComposeOid
%ConstructClone %Delete %DeleteExtent %DeleteId
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Exists
%ExistsId %Extends %GUID %GUIDSet
%GetLock %GetParameter %GetSwizzleObject %Id
%InsertBatch %IsA %IsModified %IsNull
%KillExtent %KillExtentData %LoadFromMemory %LockExtent
%LockId %New %NormalizeObject %ObjectIsNull
%ObjectModified %Oid %OnBeforeAddToSync %OnDetermineClass
%Open %OpenId %OriginalNamespace %PackageName
%PhysicalAddress %PurgeIndices %Reload %RemoveFromSaveSet
%ResolveConcurrencyConflict %RollBack %Save %SaveDirect
%SaveIndices %SerializeObject %SetModified %SortBegin
%SortEnd %SyncObjectIn %SyncTransport %UnlockExtent
%UnlockId %ValidateIndices %ValidateObject AllowClearFailoverDBFlag
AllowNewMirrorSet CheckSecurity Get GetAsyncMemberGUID
GetList Help IsDRMember IsReadOnlyReportingMember
IsReadWriteReportingMember Modify Open XMLDTD
XMLExport XMLExportToStream XMLExportToString XMLNew
XMLSchema XMLSchemaNamespace XMLSchemaType isAsyncMember


Parameters

• parameter PROPERTIESMAYBEINCPF = "DebugFlags,DDNSKey";
List of properties which may or may not be in the CPF file.
They have a corresponding %Boolean property to determine if they are in the file or not. For example, the property "DebugFlags" has a %Boolean "DebugFlagsPresent" property associated with it.

Properties

• property AgentAddress as %NetworkAddress;
• property AsyncMemberGUID as %String;
• property AsyncMemberType as %Integer(MAXVAL=2,MINVAL=0) [ InitialExpression = 0 ];
AsyncMemberType indicates the async member is a disaster recovery (DR), read-only reporting or read-write reporting async member.
0 - Disaster Recovery (DR). This is a disaster recovery async member, all its mirrored databases are read-only mirrored databases.
1 - Read-Only Reporting. This is a reporting async member, all its mirrored databases could be read-only or read-write databases, the default is read-only when the database is created.
2 - Read-Write Reporting. This is a reporting async member, all its mirrored databases could be read-only or read-write databases, the default is read-write when the database is created.
• property AsyncUseSystemPurgeInterval as %Boolean [ InitialExpression = 0 ];
AsyncUseSystemPurgeInterval when set indicates that the async member should purge mirror journal files according to the same criteria it uses for purging local journal files (eg. after a certain number of days or a certain number of backups). When this parameter is missing, or clear, the default state, mirror journal files are purged as soon as they are no longer needed because they have been replayed to the local databases and/or sent on to the various clients that connect (if this is a relay member).
• property JoinMirror as %Boolean [ InitialExpression = 0 ];
Flag indicating whether this system processes its mirror configuration at startup. When set to NO, the mirror configuration is ignored and the system is not considered a mirror member. This can be used if there is a problem in the configuration which prevents the system from starting or as part of removing a system from the mirror as if a system is the primary it needs to be restarted but we also need to block the system from joining the mirror when it restarts and becoming the primary again.
• property SystemName as %String(MAXLEN=32,MINLEN=0);
This is the name by which the system is known in the mirror (the mirror member name). The name is converted to uppercase before storing. The following characters are not permitted in mirror system names:
     : # , ; = ^ ~ " <space> <tab>
The following character sequences are not allowed in mirror system names:
     //  /*
Mirror system names must be unique across all mirror members as some mirror members (eg. relay and async members) may participate in multiple mirrors and they will have the same system name in all of the mirrors.
• property VirtualAddressInterface as %String(MAXLEN=255);
When the mirror is configured to keep a virtual ip address assigned to the primary, this is the local interface which hosts the IP address.

Consult the documentation for the format specific to the operating system.


Methods

• classmethod AllowClearFailoverDBFlag(ByRef CPFFile As %String = "") as %Boolean
Check if this mirror member allow user to clear the FailoverDB flag in mirrored databases.
Only the non-DR async member allow user to clear the FailverDB flag in mirrored databases.
• classmethod AllowNewMirrorSet(ByRef CPFFile As %String = "") as %Boolean
Return whether the async member is allowed to add a new mirror set to be tracked.
• classmethod CheckSecurity(ByRef enabled As %Boolean) as %Status
Check the required security settings
Returns $$$ERROR(reason) if we fail to look up the security setting. Otherwise returns $$$OK and sets the passed 'enabled' variable to True/False.
• method GetAsyncMemberGUID() as %String
Returns AsyncMemberGUID of the async or relay member
• classmethod IsDRMember(ByRef CPFFile As %String = "") as %Boolean
Check if this mirror member is a Disaster Recovery (DR) async member.
• classmethod IsReadOnlyReportingMember(ByRef CPFFile As %String = "") as %Boolean
Check if this mirror member is a read-only reporting async member.
• classmethod IsReadWriteReportingMember(ByRef CPFFile As %String = "") as %Boolean
Check if this mirror member is a read-write reporting async member.
• classmethod isAsyncMember(ByRef CPFFile As %String = "") as %Boolean
Returns TRUE/FALSE for whether this node is configured as an async or relay member in the configuration.

Indices

•index (CPFNameSectionHeaderName on CPFName,SectionHeader,Name) [IdKey,Unique];


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