Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ham_en/ham/clientlib/ha_connection_ctrl.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ham_en/ham/clientlib/ha_connection_ctrl.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ham_en/ham/clientlib/ha_connection_ctrl.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ham_en/ham/clientlib/ha_connection_ctrl.html on line 8
Control the operation of a HA-aware connection
#include <ha/cover.h>
int ha_connection_ctrl(int coid, int command, void *args)
libha
The ha_connection_ctrl() function can be used to control the
operation of the HA-aware conenction. Specifically it can
be used to control the recovery method, temporarily suspend
recovery and also control the number of times that will be attempted
both consecutively for a single failure, or across all
failures. Currently the following commands are defined:
- HA_RECOVERY_ACOUNT
- This sets the maximum number of times recovery is performed
for this connection. The value is specified by passing it via
“args” as an integer. A negative value implies that there is
no limit on the number of times recovery will be performed, and
this is the default state of the connection when it is made HA aware.
- HA_RECOVERY_ICOUNT
- This sets the maximum number of iterations, recovery is performed
for this connection, each time a connection is found to have
failed. This count is reset each time the connection is
successfully recovered. The value is specified by passing it
via “args” as an integer. A negative value implies that there is
no limit on the number of times recovery will be performed, and
this is the default state of the connection when it is made HA aware.
- HA_RECOVERY_SUSPEND
- Temporarily suspends any recovery on this connection. It will
behave like a normal connection.
- HA_RECOVERY_ENABLE
- Re-enables any recovery on this connection. All other
recovery options are unaffected. This just toggles the
“recovery enabled/disabled” bit.
- HA_RECOVERY_RESET_ICOUNT
- Resets the iteration count used by HA_RECOVERY_ICOUNT above. This
sets the internal count per iteration to zero.
- HA_RECOVERY_RESET_ACOUNT
- Resets the total count used by HA_RECOVERY_ACOUNT
above. This sets the internal count of recoveries to zero.
- 0
- Success.
- -1
- An error occurred (errno is set).
- EBADF
- No connection is specified by this coid, or connection is not
HA-aware.
- EINVAL
- Invalid command.
QNX Neutrino
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
ha_attach(),
ha_detach(),
ha_open(),
ha_reopen(),
ha_ConnectAttach(),
ha_ConnectDetach()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ham_en/ham/clientlib/ha_connection_ctrl.html on line 169
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ham_en/ham/clientlib/ha_connection_ctrl.html on line 169