With the function isRefresh(), you can check whether the workFunction of a dpConnect() has been triggered by a redundancy switch or has been triggered when trying to establish a connection to a distributed system. The workFunction is called as follows:
(1) isAnswer() returns TRUE (otherwise FALSE). (2) getLastError() returns an errClass with getErrorCode() == 144 (system lost) and getErrorDpName() the system name. The dyn_dyn_anytype is empty. (3) Only when the on
_original.._invalid, _original.._bad, _original.._status, _online.._invalid,
_online.._bad, _online.._status are queried, the getLastError()
returns an errClass with getErrorCode()
== 144 and getErrorDpName() the system
name. _invalid, _bad bits are TRUE, the
invalid bits are set for _status, and _stime is the current time. All other values
are dummy values (0, FALSE). In all other cases the work function is not called. (4) isRefresh() returns TRUE (otherwise FALSE). (5) getLastError() returns an errorClass with getErrorCode() == 157 and getErrorDpName() the system name.
When executing dpQueryConnectSingle()/-All with remote all (a dpQueryConnectSingle or dpQueryConnectAll to all systems), only the first answer that is returned (generally the answer from the own system) is considered as an answer (first row). All other answers are considered as refresh (system comes or a redundancy switch). This means that the isAnswer() returns TRUE only the first time (and isRefresh() returns FALSE). Afterwards the isAnswer() returns FALSE (and isRefresh() TRUE). |
Synopsis
bool isRefresh(); |
Return value
Bool. TRUE (1) if the WorkFunction of a dpConnect() has been triggered by a redundancy switch or was triggered when trying to establish a connection to a redundant system. FALSE when not. |
Errors
Description
With the function isRefresh(), you can check whether the workFunction of a dpConnect() has been triggered by a redundancy switch or has been triggered when trying to establish a connection to a redundant system. |
Assignment
Administration of managers. |
Availability
CTRL |
See also
V 3.11 SP1
Copyright