Purpose
ha_gs_protocol_rejected_callback - A callback routine that the Group Services subsystem calls to deliver a protocol rejected notification to a GS client
Library
GSAPI Thread-Safe Library (libha_gs_r.a)
GSAPI Library (not thread-safe) (libha_gs.a)
Syntax
#include <ha_gs.h> void ha_gs_protocol_rejected_callback( const ha_gs_rejected_notification_t *notification)
Parameters
Description
The ha_gs_protocol_rejected_callback subroutine defines a GS client's protocol rejected callback routine. The GS client uses it to handle protocol rejected notifications from the Group Services subsystem. The process provides the address of the protocol rejected callback routine to the Group Services subsystem on the ha_gs_join subroutine when it joins the group as a provider. The Group Services subsystem then calls the protocol rejected callback routine when it has a protocol rejected notification to deliver to the GS client. This occurs after a n-phase protocol has been rejected by voting. One-phase protocols cannot be rejected; they are all automatically approved.
On input, the protocol rejected callback routine receives information that specifies the proposed changes to the group, such as its membership or its state value, as well as other control information for the protocol, such as the reason for the rejection.
A protocol can be rejected for several reasons, which include:
When a protocol is rejected because a provider failed, the Group Services subsystem initiates a separate failure leave protocol to allow the group to handle the failure. The failure leave protocol specifies the list of failing providers.
When a protocol is rejected because votes were not submitted within the voting time limit, the Group Services subsystem delivers an announcement notification that lists the tardy providers.
On input, the protocol rejected callback routine receives a pointer to the protocol rejected notification block. The protocol rejected notification block has the following definition:
typedef struct { ha_gs_notification_type_t ha_gs_notification_type; ha_gs_token_t gs_provider_token; ha_gs_request_t gs_protocol_type; ha_gs_summary_code_t gs_summary_code; ha_gs_proposal_t *gs_proposal; } ha_gs_rejected_notification_t;
The gs_notification_type field contains the type of notification. For a protocol rejected notification, it contains a value of HA_GS_REJECTED_NOTIFICATION.
The gs_provider_token field contains a token that identifies the caller as a provider of the group. This token was previously initialized when the provider joined the group using the ha_gs_join subroutine.
The gs_protocol_type field contains the type of request for which this protocol rejected notification is being delivered.
The gs_summary_code field contains one or more flags that indicate whether any default votes were recorded during any previous voting phase. It can contain one or more of the following flags:
The gs_proposal field points to the proposal block for the proposal on which the vote is requested. For information about this block, see the ha_gs_n_phase_callback man page.
Restrictions
For important information about multiprocessing considerations that apply to all callback routines, see the ha_gs_n_phase_callback man page.
Return Values
None.
Error Values
None.
Synchronous Errors
None.
Asynchronous Errors
None.
Files
ha_gs.h
Prerequisite Information
Related Information
Subroutines: ha_gs_init, ha_gs_join, ha_gs_change_state_value, ha_gs_send_message, ha_gs_leave, ha_gs_expel,ha_gs_change_attributesha_gs_goodbye