%SYS
All Classes Namespaces Functions Variables Pages
Mirrors Class Reference

This class allows you to modify and view the [Mirrors] section of the CPF file through programmatic APIs. More...

Inheritance diagram for Mirrors:
Collaboration diagram for Mirrors:

Static Public Member Functions

_.Library.Status Delete (_.Library.String Name, _.Library.String CPFFile, _.Library.Integer Flags, _.Library.Integer Clean)
 Delete a 'Mirrors' section from a CPF file. More...
 
_.Library.String GetMirrorName (_.Library.String PrevName)
 Returns a mirror name which this instance has loaded or is configured to. More...
 
- Static Public Member Functions inherited from CommonMultipleMethods
_.Library.Status Create (_.Library.String Name, _.Library.String Properties, _.Library.String CPFFile, _.Library.Integer Flags)
 Create a section instance in a CPF file. More...
 
_.Library.Status Delete (_.Library.String Name, _.Library.String CPFFile, _.Library.Integer Flags)
 Delete a section instance from a CPF file. More...
 
_.Library.Boolean Exists (_.Library.String Name, _.Library.ObjectHandle Obj, _.Library.Status Status, _.Library.String CPFFile, _.Library.Integer Flags)
 Database exists. More...
 
_.Library.Status Get (_.Library.String Name, _.Library.String Properties, _.Library.String CPFFile, _.Library.Integer Flags)
 Get a section instances properties from a CPF file. More...
 
_.Library.Status GetList (_.Library.String Name, _.Library.String CPFFile, _.Library.Integer Flags)
 Returns the properties from a section instance in a CPF file by value in $list format
More...
 
_.Library.Status Modify (_.Library.String Name, _.Library.String Properties, _.Library.String CPFFile, _.Library.Integer Flags)
 Modify a section instance in a CPF file. More...
 
_.Library.ObjectHandle Open (_.Library.String Name, _.Library.String CPFFile, _.Library.Integer concurrency, _.Library.Status Status, _.Library.Integer Flags)
 Open a section instance object in a CPF file. More...
 

Public Attributes

 AllowParallelDejournaling
 Determines the type of mirror members can run parallel dejournaling updaters. More...
 
 ArbiterNode
 An address for the arbiter node used by this mirror. More...
 
 CompressionForAsyncMembers
 Determines whether journal data is compressed before being transmitted to async members (disaster recovery and reporting). More...
 
 CompressionForFailoverMembers
 Determines whether journal data is compressed before being transmitted between failover members. More...
 
 CompressionTypeForAsyncMembers
 Compress type when CompressionForAsyncMembers is set to 'Compressed' mode. More...
 
 CompressionTypeForFailoverMembers
 Compress type when CompressionForFailoverMembers is set to 'Compressed' mode. More...
 
 DefinedPrimary
 Field used internally when mirror failover is disabled,. More...
 
 GUID
 Internal GUID which is unique to this mirror. More...
 
 Name
 Mirror names are uppercase (alphanumeric) More...
 
 QOSTimeout
 Contains the time in milliseconds which the primary will wait for the backup. More...
 
 UseSSL
 Yes/No field for whether the mirror uses to encrypt the communication. More...
 
 VirtualAddress
 Optional Virtual IP address which the mirror maintains pointing to the. More...
 
- Public Attributes inherited from CommonProperties
 CPFFile
 CPF file which the object maps to. More...
 
 Comments
 Embedded comments in the CPF file. More...
 
 Flags
 Flags governing how the object is processed when Save() is called. More...
 
 Name
 Name of the object instance. More...
 

Additional Inherited Members

- Static Public Attributes inherited from CommonMultipleMethods
 CAPITALNAME = None
 Determines if the Name specified in the index should be capitalized. More...
 
 SECTIONTYPE = None
 This parameter governs how the class creates audit records. More...
 
- Static Public Attributes inherited from CommonProperties
 DOMAIN = None
 This class contains properties which are included by classes which manipulate sections in the CPF file. More...
 

Detailed Description

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
    

Member Function Documentation

◆ Delete()

_.Library.Status Delete ( _.Library.String  Name,
_.Library.String  CPFFile,
_.Library.Integer  Flags,
_.Library.Integer  Clean 
)
static

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 <METHOD>Create</METHOD> method for values.
Clean - Clean mirror journal files. 0 - don't clean, 1 - clean files not in journal.log, 2 - clean all files.

Return values:
CPFFile (byref) - Name of the CPF file the modification was made in.

◆ GetMirrorName()

_.Library.String GetMirrorName ( _.Library.String  PrevName)
static

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 <classmethod>##class(SYS.MirrorConfiguration).GetListOfMirrorNames()</classmethod> 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.

Member Data Documentation

◆ AllowParallelDejournaling

AllowParallelDejournaling

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.

 

◆ ArbiterNode

ArbiterNode

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).

 

◆ CompressionForAsyncMembers

CompressionForAsyncMembers

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.

 

◆ CompressionForFailoverMembers

CompressionForFailoverMembers

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.

 

◆ CompressionTypeForAsyncMembers

CompressionTypeForAsyncMembers

Compress type when CompressionForAsyncMembers is set to 'Compressed' mode.

It is meanlinless if CompressionForAsyncMembers is not 'Compressed' mode.


0 - ZLIB.
1 - ZSTD.
2 - LZ4.

 

◆ CompressionTypeForFailoverMembers

CompressionTypeForFailoverMembers

Compress type when CompressionForFailoverMembers is set to 'Compressed' mode.

It is meanlinless if CompressionForFailoverMembers is not 'Compressed' mode.


0 - ZLIB.
1 - ZSTD.
2 - LZ4.

 

◆ DefinedPrimary

DefinedPrimary

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.  

◆ GUID

GUID

Internal GUID which is unique to this mirror.

 

◆ Name

Name

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  

◆ QOSTimeout

QOSTimeout

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. The default is 8000 msec, the max value is 5 minutes.  

◆ UseSSL

UseSSL

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 <property>Config.MapMirrors.EncryptCommunication</property> and by <property>Config.MapMirrors.RequireEncryption MapMirrors</property>.

Setting this field to Yes forces <property>RequireAuthentication</property> to be set to Yes and <property>RequireAuthentication</property> 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.  

◆ VirtualAddress

VirtualAddress

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.