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

persistent class Config.Mirrors extends %Persistent, Config.CommonMultipleMethods, Config.CommonProperties, %SYSTEM.Help

This class allows you to modify and view the [Mirrors] section of the CPF file through programmatic APIs. Mirrors can be managed via the ^MIRROR utility in addition to the standard InterSystems IRIS System Management tools. The methods in this class which retrieve information can be called directly but the configuration should not be changed via direct calls to these methods.

Since mirror members can be a mixture of InterSystems IRIS versions there are various properties in this class which are now obsolete and have fixed values, or no meaning to the running version, but remain for compatibility with older versions.

EXAMPLE:

; Use class methods to retrieve properties
%SYS>s Status=##Class(Config.Mirrors).Get(Name,.Properties)
%SYS>i 'Status w !,"Error="_$SYSTEM.Status.GetErrorText(Status)
%SYS>zw Properties
Properties("Enabled")=0

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 16 20 2 1


Summary

Properties
AllowParallelDejournaling ArbiterNode CPFFile
Comments CompressionForAsyncMembers CompressionForFailoverMembers
CompressionTypeForAsyncMembers CompressionTypeForFailoverMembers DefinedPrimary
Flags GUID Name
QOSTimeout UseSSL VirtualAddress

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 Create
Delete Exists Get GetList
GetMirrorName Help Modify Open
Version XMLDTD XMLExport XMLExportToStream
XMLExportToString XMLNew XMLSchema XMLSchemaNamespace
XMLSchemaType


Parameters

• parameter CAPITALNAME = 1;
Determines if the Name specified in the index should be capitalized.

Properties

• property AllowParallelDejournaling as %Integer(MAXVAL=2,MINVAL=0) [ InitialExpression = 0 ];
Determines the type of mirror members can run parallel dejournaling updaters.
0 - Failover and Disaster Recover members.
1 - Failover members only.
2 - All members including Failover, Disaster Recovery and Reporting Async members.

• property ArbiterNode as %String(MAXLEN=2048);
An address for the arbiter node used by this mirror.
The arbiter node is used by the failover members as an observer to provide information to an active backup that allows it to take over when the agent on the primary cannot be contacted (eg. the primary loses power).

• property CompressionForAsyncMembers as %Integer(MAXVAL=2,MINVAL=0) [ InitialExpression = 0 ];
Determines whether journal data is compressed before being transmitted to async members (disaster recovery and reporting).
0 - System Selected: The system will use a compression strategy expected to balance network utilization with performance.
1 - Uncompressed: No compression will be used.
2 - Compressed: Compression will be used.

• property CompressionForFailoverMembers as %Integer(MAXVAL=2,MINVAL=0) [ InitialExpression = 0 ];
Determines whether journal data is compressed before being transmitted between failover members.
0 - System Selected: The system will use compression only in configurations where it is expected to improve the response time for synchronization between the primary and backup.
1 - Uncompressed: No compression will be used.
2 - Compressed: Compression will be used.

• property CompressionTypeForAsyncMembers as %Integer(MAXVAL=2,MINVAL=0) [ InitialExpression = 0 ];
Compress type when CompressionForAsyncMembers is set to 'Compressed' mode. It is meanlinless if CompressionForAsyncMembers is not 'Compressed' mode.
0 - ZLIB.
1 - ZSTD.
2 - LZ4.

• property CompressionTypeForFailoverMembers as %Integer(MAXVAL=2,MINVAL=0) [ InitialExpression = 0 ];
Compress type when CompressionForFailoverMembers is set to 'Compressed' mode. It is meanlinless if CompressionForFailoverMembers is not 'Compressed' mode.
0 - ZLIB.
1 - ZSTD.
2 - LZ4.

• property DefinedPrimary as %String;
Field used internally when mirror failover is disabled, generally for maintenance purposes. Manipulated via the nofailover options when shutting down InterSystems IRIS. This contains the mirror system name of the node which is allowed to become the primary. It is cleared automatically when that node starts up and becomes the primary (eg. starting it NOSTU will not clear this field). This can also be set and cleared manually via ^MIRROR.
• property GUID as %String [ Required ];
Internal GUID which is unique to this mirror
• property Name as %String(MAXLEN=15) [ Required ];
Mirror names are uppercase (alphanumeric) Name of the mirror, restricted to 15 uppercase alphanumeric characters. Must be unique across the mirrors managed by the EMS
• property QOSTimeout as %Integer [ InitialExpression = 8000 ];
Contains the time in milliseconds which the primary will wait for the backup to acknowledge receipt of a chunk of journal data before the primary marks the backup as inactive.
• property UseSSL as %Boolean [ InitialExpression = 0 ];
Yes/No field for whether the mirror uses to encrypt the communication between members for every mirror connection. When set to Yes the Mirror SSL configuration is used for client/server connections by this node. When set to No, encryption setting are controlled on a per-connection basis via Config.MapMirrors.EncryptCommunication and by Config.MapMirrors.RequireEncryption MapMirrors.

Setting this field to Yes forces RequireAuthentication to be set to Yes and RequireAuthentication cannot be set to No while this field is enabled.

This must be enabled when journal files are encrypted on the failover mirror members or when there are any encrypted mirrored databases.
• property VirtualAddress as %String(MAXLEN=256,MINLEN=0);
Optional Virtual IP address which the mirror maintains pointing to the current primary. When this is specified the failover members must be configured to host the Virtual IP on one of their interfaces. This is used by TCP/IP Client applications to connect to the primary mirror member.

Methods

• classmethod Delete(Name As %String, ByRef CPFFile As %String = "", Flags As %Integer = $$$CPFSave+$$$CPFWrite+$$$CPFActivate, Clean As %Integer = 1) as %Status
Delete a 'Mirrors' section from a CPF file.

Parameters:
Name - Name of the mirror to delete.
CPFFile (byref) - Name of the CPF file to use, Default=current active CPF file.
Flags - Bit string of options to perform. See the Create method for values.

Return values:
CPFFile (byref) - Name of the CPF file the modification was made in.
• classmethod GetMirrorName(PrevName As %String = "") as %String
Returns a mirror name which this instance has loaded or is configured to load. For Failover members there is only ever one entry here. For async and reporting members they may join multiple mirrors and for those types of members, this method serves as a $ORDER type method where it takes a mirror name (or null) and returns the next (or 1st) mirror name in the configuration. It returns null when there are no other mirror names to return.

Callers who want a list of all of the mirror members should probably call the %Config.Mirrors:List query directly or use the ##class(SYS.MirrorConfiguration).GetListOfMirrorNames() method rather than calling this method over and over. This is mostly used on failover nodes to get the name of the current mirror.

This method looks first at the loaded mirrors and if there aren't any, reads the configuration to get the set of configured mirrors.
• classmethod Version() as %Integer

Queries

• query List(Names As %String = "*", CPFFile As %String = "", Flags As %Integer = 0, Format As %Integer = 0)
Selects Name As %String, GUID As %String, ACKRequirement As %Integer, AgentContactRequiredForTakeover As %Boolean, DefinedPrimary As %String, QOSTimeout As %Integer, TroubleTimeout As %Integer, UseSSL As %Boolean, VirtualAddress As %String, RequireAuthentication As %Boolean, ArbiterNode As %String, CompressionForFailoverMembers As %Integer, CompressionForAsyncMembers As %Integer, AllowParallelDejournaling As %Integer, CompressionTypeForFailoverMembers As %Integer, CompressionTypeForAsyncMembers As %Integer
List Mirrors in a CPF file.

Parameters:
Names - Comma separated list of Mirror names
"*" - All records match
"String,String1" - Any records matching one of these elements
"String*" - Any record starting with "String"
"String,String1*,String2" - Any record matching one of these elements, or starting with "String1"
CPFFile - Name of the CPF file to use. A null string means use the active CPF file.
Flags - Currently ignored.
Format
0 - Standard report list format
1 - ^CONFIG global format
2 - CPF file format format
Note: This query may change in future versions

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.