IBM Books

Group Services Programming Guide and Reference

ha_gs_responsiveness_callback subroutine

Purpose

ha_gs_responsiveness_callback - A callback routine that the Group Services subsystem calls to deliver a responsiveness 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>
 
ha_gs_callback_rc_t
    ha_gs_responsiveness_callback(
        const   ha_gs_responsiveness_notification_t     *notification)
 

Parameters

notification
A pointer to a responsiveness notification block.

Description

The ha_gs_responsiveness_callback subroutine defines a GS client's responsiveness callback routine. The GS client uses it to handle responsiveness notifications from the Group Services subsystem. The process provides the address of the responsiveness callback routine to the Group Services subsystem on the ha_gs_init subroutine during GSAPI initialization. The Group Services subsystem then calls the responsiveness callback routine when it has a responsiveness notification to deliver to the GS client.

The responsiveness callback routine is called at intervals. Therefore, in addition to responding to the Group Services subsystem, the GS client can also use the routine to perform validity checks on its own operation or its environment.

On input, the responsiveness callback routine receives a pointer to the responsiveness notification block. The responsiveness notification block has the following definition:

typedef struct {
    ha_gs_notification_type_t   gs_notification_type;
    ha_gs_responsiveness_t      gs_responsiveness_information;
} ha_gs_responsiveness_notification_t;

The gs_notification_type field contains the type of notification. For a responsiveness notification, it contains a value of HA_GS_RESPONSIVENESS_NOTIFICATION.

The gs_responsiveness_information field contains the responsiveness control structure that was specified on input to the ha_gs_init subroutine when this process initialized itself with the Group Services subsystem. This structure specifies the method, if any, to be used to perform responsiveness checks for this process, and how frequently the checks should be performed. For details on the responsiveness control structure, see ha_gs_init.

Restrictions

For important information about multiprocessing considerations that apply to all callback routines, see the ha_gs_n_phase_callback man page.

Return Values

On output, the Group Services subsystem expects the responsiveness callback routine to return a code that indicates whether the GS client is operational. If it is, the ha_gs_responsiveness_callback subroutine should return a value of HA_GS_CALLBACK_OK.

Error Values

If the GS client has detected an internal problem that prevents its correct operation, the ha_gs_responsiveness_callback subroutine should return a value of HA_GS_CALLBACK_NOT_OK. In response, the Group Services subsystem considers the process to be nonresponsive and sends an announcement notification to the group's providers that lists the nonresponsive providers.

Synchronous Errors

None.

Asynchronous Errors

None.

Files

ha_gs.h

Prerequisite Information

Understanding Group Services.

Related Information

Subroutine: ha_gs_init, ha_gs_expel


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]