Code Examples.
Code Examples.
.clGmsClusterMemberGetCallback = NULL,
.clGmsGroupTrackCallback = NULL,
.clGmsGroupMemberGetCallback = NULL
};
ClRcT simple_init_finalize_cycle()
{
{
printf("GMS Initialize failed with rc [0x%x]\n",rc);
return rc;
}
{
printf("GMS finalize failed with rc [0x%x]\n",rc);
return rc;
}
}
ClUint32T ClRcT
Clovis return code type.
Definition: clCommon.h:168
#define CL_OK
Every thing is OK.
Definition: clCommonErrors.h:68
ClHandleT ClGmsHandleT
Handle for using the GMS API.
Definition: clClmTmsCommon.h:137
ClRcT clGmsFinalize(CL_IN ClGmsHandleT gmsHandle)
Cleans up the GMS library.
ClRcT clGmsInitialize(CL_OUT ClGmsHandleT *gmsHandle, CL_IN const ClGmsCallbacksT *gmsCallbacks, CL_INOUT ClVersionT *version)
Initializes the GMS library and registers the callback functions.
Version Information for various services.
Definition: clCommon.h:250
This callback structure is provided to the GMS library during Initialization.
Definition: clClmTmsCommon.h:810
ClGmsClusterTrackCallbackT clGmsClusterTrackCallback
This callback is invoked to notify the registered user about any change in the cluster configuratio...
Definition: clClmTmsCommon.h:828
static ClHandleT handle = 0;
static ClBoolT callback_invoked =
CL_FALSE;
static void clGmsClusterTrackCallbackFuntion (
CL_IN ClUint32T numberOfMembers,
{
printf("Inside cluster track callback function. \n");
}
.clGmsClusterMemberGetCallback = NULL,
.clGmsGroupTrackCallback = NULL,
.clGmsGroupMemberGetCallback = NULL
};
ClRcT track_changes_and_changes_only_flag_test()
{
{
printf("GMS Initialize failed with rc 0x%x\n",rc);
return rc;
}
{
printf("GMS cluster track failed with rc 0x%x\n",rc);
return rc;
}
sleep(10);
{
printf("Cluster track callback is not invoked\n");
}
{
printf("clGmsClusterTrack with TRACK_CHANGES_ONLY flag failed with "
"rc = 0x%x",rc);
return rc;
}
sleep(10);
{
printf("Cluster track callback is not invoked\n");
}
{
printf("clGmsClusterTrackStop failed with rc = 0x%x",rc);
return rc;
}
{
printf("finalize failed with rc = 0x%x",rc);
return rc;
}
}
#define CL_FALSE
define the False
Definition: clCommon.h:61
#define CL_TRUE
define the Truth
Definition: clCommon.h:59
#define CL_IN
CL_IN macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:106
ClRcT clGmsClusterTrackStop(CL_IN ClGmsHandleT gmsHandle)
Stops all the clusters tracking.
ClRcT clGmsClusterTrack(CL_IN ClGmsHandleT gmsHandle, CL_IN ClUint8T trackFlags, CL_INOUT ClGmsClusterNotificationBufferT *notificationBuffer)
Configures the cluster tracking mode.
@ CL_GMS_TRACK_CHANGES
To subscribe for view notifications that includes current view and the recent change.
Definition: clClmTmsCommon.h:183
@ CL_GMS_TRACK_CHANGES_ONLY
To subscribe for delta notifications.
Definition: clClmTmsCommon.h:188
Buffer to convey the view: the list of nodes and their status.
Definition: clClmTmsCommon.h:337