TibrvFtMemberCallback.onFtAction()
Method
Declaration
voidonFtAction
(
TibrvFtMember member,
java.lang.String groupName,
int action)
Purpose
Process fault tolerance events for a group member.
Remarks
Each member program of a fault tolerance group must implement this method. Programs register a member callback object (and this method) with each call to TibrvFtMember().
Rendezvous fault tolerance software queues a member action event in three situations. In each case, it passes a different action
argument, instructing the callback method to activate, deactivate, or prepare to activate the program.
• | When the number of active members drops below the active goal, the fault tolerance callback method (in the ranking inactive member process) receives the token TibrvFtMember.ACTIVATE; the callback method must respond by assuming the duties of an active member. |
• | When the number of active members exceeds the active goal, the fault tolerance callback method (in any active member that is outranked by another active member) receives the action token TibrvFtMember.DEACTIVATE; the callback method must respond by switching the program to its inactive state. |
• | When the number of active members equals the active goal, and Rendezvous fault tolerance software detects that it might soon decrease below the active goal, the fault tolerance callback method (in the ranking inactive member) receives the action token TibrvFtMember.PREPARE_TO_ACTIVATE; the callback method must respond by making the program ready to activate immediately. For example, preparatory steps might include time-consuming tasks such as connecting to a database. If the callback method subsequently receives the TibrvFtMember.ACTIVATE token, it will be ready to activate without delay. |
For additional information see Fault Tolerance Callback Actions.
Parameter |
Description |
|
This parameter receives the member object. |
|
This parameter receives a string denoting the name of the fault tolerance group. |
|
This parameter receives a token that instructs the callback method to activate, deactivate or prepare to activate. See Constants. |