|
Class Reference
%SYSTEM.Mirror
|
|
![]() |
|||
Private Storage |
This class provides documentation for the public $SYSTEM.Mirror methods
which are accessable from any namespace. These methods can be invoked
either via ##class(%SYSTEM.Mirror).(< methodname >) or via
$SYSTEM.Mirror.(< methodname >). Most of the public API for
mirroring is in the
|
|
|
Test whether this system is connected to a primary as an async mirror member.
This reports true when this node has a data channel established to a primary mirror member as an async member. The node can be configured as an async member but this will report false if it does not have any data channels established at the time.Return Value:
      TRUE = node is currently connected to a mirror as an async member
      FALSE = node is not currently connected to a mirror as an async member
Test whether this system is a backup mirror member.
A failover mirror member might report false for both IsPrimary and IsBackup if it is in the process of connecting or has failed to connect for some reason. IsBackup() is only true while the mirror data channel exists.Return Value:
      TRUE = node is currently connected to a mirror as a backup
      FALSE = node is not currently connected to a mirror as a backup
Test whether this system is configured to join a mirror.
This method is useful when a site has code that should only be run on the Primary node when the node is a mirror member. This could be used in ^ZSTART or ^ZSTU to skip this code during startup when the node is a mirror member (startup code for mirrors should go in NotifyBecomePrimary^ZMIRROR).
This is also useful in conjunction with$SYSTEM.Mirror.IsPrimary in other code, such as code that is run periodically via the TaskManager, to skip running the code on non-primary mirror members as in
      quit:($SYSTEM.Mirror.IsMember() & '$SYSTEM.Mirror.IsPrimary())Return Value:
      0 - Node is not configured to join a mirror
      1 - Node is configured as a failover mirror member
      2 - Node is configured as an async mirror member
Test whether this system is the primary mirror member.
Return Value:
      TRUE = node is the primary
      FALSE = node is not the primary
Returns the name of the mirror if the instance is configured as a failover mirror member or NULL if it is not.