84 #ifndef _CL_CLM_TMS_COMMON_H
85 #define _CL_CLM_TMS_COMMON_H
101 #define CL_GMS_MAX_ADDRESS_LENGTH 64
106 #define CL_GMS_LOCAL_NODE_ID 0XFFFFFFFF
111 #define CL_GMS_INVALID_HANDLE ((ClGmsHandleT)0)
116 #define CL_GMS_INVALID_NODE_ID 0xffffffff
121 #define CL_GMS_INELIGIBLE_CREDENTIALS 0x0
126 #define CL_GMS_INVALID_GROUP_ID -1
612 #define LEADER_ELECTION_ALGORITHM "LeaderElectionAlgorithm"
615 #define CL_GMS_DEFAULT_BOOT_ELECTION_TIMEOUT 5
646 ClSelectionObjectT *pSelectionObject
667 ClRcT clGmsCompUpNotify (
704 CL_IN ClUint32T numberOfMembers,
734 CL_IN ClInvocationT invocation,
772 CL_IN ClUint32T numberOfMembers,
802 CL_IN ClInvocationT invocation,
988 CL_IN ClUint8T trackFlags,
1105 CL_IN ClInvocationT invocation,
Typical defines found in any software project.
Header file of Ioc Data Structures and APIs.
ClUint32T ClRcT
Clovis return code type.
Definition: clCommon.h:168
#define CL_INOUT
CL_INOUT macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:108
ClInt64T ClTimeT
Time duration specified in nanoseconds.
Definition: clCommon.h:154
#define CL_OUT
CL_OUT macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:110
ClDispatchFlagsT
Dispatch flags.
Definition: clCommon.h:260
#define CL_IN
CL_IN macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:106
ClHandleT ClGmsHandleT
Handle for using the GMS API.
Definition: clClmTmsCommon.h:137
#define CL_GMS_MAX_ADDRESS_LENGTH
Maximum length of the address value.
Definition: clClmTmsCommon.h:101
void(* ClGmsGroupTrackCallbackT)(CL_IN ClGmsGroupIdT groupId, CL_IN const ClGmsGroupNotificationBufferT *notificationBuffer, CL_IN ClUint32T numberOfMembers, CL_IN ClRcT rc)
Callback for tracking group view changes.
Definition: clClmTmsCommon.h:769
struct ClGmsGroupParamsT ClGmsGroupParamsT
Parameters for group provided during group creation.
ClRcT clGmsClusterTrackStop(CL_IN ClGmsHandleT gmsHandle)
Stops all the clusters tracking.
ClRcT clGmsDispatch(ClGmsHandleT clmHandle, ClDispatchFlagsT dispatchFlags)
Dispatch API as per SAF symantics for dispatching the pending callbacks.
ClUint32T ClGmsGroupIdT
System-wide unique ID of the group.
Definition: clClmTmsCommon.h:380
ClGmsMemberEjectReasonT
Reason codes for ejecting the user from cluster/group.
Definition: clClmTmsCommon.h:620
void(* ClGmsClusterTrackCallbackT)(CL_IN const ClGmsClusterNotificationBufferT *notificationBuffer, CL_IN ClUint32T numberOfMembers, CL_IN ClRcT rc)
Callback for tracking cluster view changes.
Definition: clClmTmsCommon.h:702
struct ClGmsClusterMemberT __attribute__((__aligned__(8)))
This structure describes one member (or node) of the cluster.
struct ClGmsCallbacksT ClGmsCallbacksT
This callback structure is provided to the GMS library during Initialization.
struct ClGmsNodeAddressT ClGmsNodeAddressT
IP Address of the node can be of IPv4 or IPv6.
ClUint32T ClGmsLeadershipCredentialsT
Credentials for leader election.
Definition: clClmTmsCommon.h:150
struct ClGmsGroupInfoListT ClGmsGroupInfoListT
Structure used to pass the meta data on all the existing groups.
ClRcT clGmsSelectionObjectGet(ClGmsHandleT clmHandle, ClSelectionObjectT *pSelectionObject)
The selection object fd provided by GMS client on which the user can poll for any callbacks as per SA...
ClRcT clGmsClusterMemberGet(CL_IN ClGmsHandleT gmsHandle, CL_IN ClGmsNodeIdT nodeId, CL_IN ClTimeT timeout, CL_OUT ClGmsClusterMemberT *clusterMember)
Returns cluster member information.
void(* ClGmsGroupMemberGetCallbackT)(CL_IN ClInvocationT invocation, CL_IN const ClGmsGroupMemberT *groupMember, CL_IN ClRcT rc)
Callback for asynchronous group member query.
Definition: clClmTmsCommon.h:801
ClNameT ClGmsGroupNameT
System-wide unique name of the group.
Definition: clClmTmsCommon.h:374
void(* ClGmsClusterMemberGetCallbackT)(CL_IN ClInvocationT invocation, CL_IN const ClGmsClusterMemberT *clusterMember, CL_IN ClRcT rc)
Callback for asynchronous cluster member query.
Definition: clClmTmsCommon.h:733
struct ClGmsGroupInfoT ClGmsGroupInfoT
Structure used to hold the metadata of a group.
ClNameT ClGmsMemberNameT
Group-unique name of the member.
Definition: clClmTmsCommon.h:386
ClGmsClusterChangesT
Enumerator and structure for the node status notification for tracking nodes.
Definition: clClmTmsCommon.h:196
ClGmsTrackFlagsT
Flags for tracking request flag.
Definition: clClmTmsCommon.h:173
ClUint32T ClGmsNodeIdT
Node ID – Unique and consistent identifier of a node.
Definition: clClmTmsCommon.h:143
ClUint32T ClGmsMemberIdT
Group-unique ID of a member.
Definition: clClmTmsCommon.h:392
ClRcT clGmsFinalize(CL_IN ClGmsHandleT gmsHandle)
Cleans up the GMS library.
ClRcT clGmsClusterMemberGetAsync(CL_IN ClGmsHandleT gmsHandle, CL_IN ClInvocationT invocation, CL_IN ClGmsNodeIdT nodeId)
Returns information on the cluster node asynchronously.
ClGmsNodeAddressFamilyT
This type defines the family to which the address of the node belongs.
Definition: clClmTmsCommon.h:157
ClRcT clGmsInitialize(CL_OUT ClGmsHandleT *gmsHandle, CL_IN const ClGmsCallbacksT *gmsCallbacks, CL_INOUT ClVersionT *version)
Initializes the GMS library and registers the callback functions.
ClRcT clGmsClusterTrack(CL_IN ClGmsHandleT gmsHandle, CL_IN ClUint8T trackFlags, CL_INOUT ClGmsClusterNotificationBufferT *notificationBuffer)
Configures the cluster tracking mode.
ClGmsGroupChangesT
Enumerator and structure of member status notification.
Definition: clClmTmsCommon.h:463
struct ClGmsGroupNotificationT ClGmsGroupNotificationT
Buffer containing the list of group members in the requested view.
@ CL_GMS_MEMBER_EJECT_REASON_API_REQUEST
The member has been ejected due to an explicit invocation of clGmsClusterMemberEject() API.
Definition: clClmTmsCommon.h:629
@ CL_GMS_MEMBER_EJECT_REASON_UNKNOWN
Reason for the eject not known.
Definition: clClmTmsCommon.h:624
@ CL_GMS_NODE_JOINED
Node has joined since last view.
Definition: clClmTmsCommon.h:205
@ CL_GMS_NODE_LEFT
Node has left since last view.
Definition: clClmTmsCommon.h:210
@ CL_GMS_NODE_RECONFIGURED
Node hes been re-configured since last view.
Definition: clClmTmsCommon.h:215
@ CL_GMS_NODE_NO_CHANGE
No change occured on the node since the last view.
Definition: clClmTmsCommon.h:200
@ CL_GMS_TRACK_CHANGES
To subscribe for view notifications that includes current view and the recent change.
Definition: clClmTmsCommon.h:183
@ CL_GMS_TRACK_CURRENT
Returns current view.
Definition: clClmTmsCommon.h:177
@ CL_GMS_TRACK_CHANGES_ONLY
To subscribe for delta notifications.
Definition: clClmTmsCommon.h:188
@ CL_GMS_AF_INET
CL_GMS_AF_INET stands for IPv4 address.
Definition: clClmTmsCommon.h:161
@ CL_GMS_AF_INET6
CL_GMS_AF_INET6 stands for IPv6 address.
Definition: clClmTmsCommon.h:166
@ CL_GMS_MEMBER_RECONFIGURED
Member reconfigured since last view.
Definition: clClmTmsCommon.h:482
@ CL_GMS_MEMBER_NO_CHANGE
Member unchanged since last view.
Definition: clClmTmsCommon.h:467
@ CL_GMS_MEMBER_LEFT
Member has left since last view.
Definition: clClmTmsCommon.h:477
@ CL_GMS_MEMBER_JOINED
Member joined since last view.
Definition: clClmTmsCommon.h:472
@ CL_GMS_LEADER_ELECT_API_REQUEST
Leadership election through API.
Definition: clClmTmsCommon.h:487
ClUint64T ClIocMulticastAddressT
IOC Multicast address.
Definition: clIocApi.h:376
A name.
Definition: clCommon.h:197
Version Information for various services.
Definition: clCommon.h:250
IP Address of the node can be of IPv4 or IPv6.
Definition: clClmTmsCommon.h:222
ClUint16T length
Length of the IP Address of the node.
Definition: clClmTmsCommon.h:232
ClGmsNodeAddressFamilyT family
Family to which the address of the node belongs.
Definition: clClmTmsCommon.h:227
ClUint8T value[CL_GMS_MAX_ADDRESS_LENGTH]
value array holds actual value of IP address
Definition: clClmTmsCommon.h:237
This structure describes one member (or node) of the cluster.
Definition: clClmTmsCommon.h:244
ClBoolT memberActive __attribute__((__aligned__(8)))
This is TRUE if the node is a member of the cluster For tracking nodes it is not set.
ClUint64T initialViewNumber __attribute__((__aligned__(8)))
The view number when the node joined.
ClBoolT leaderPreferenceSet __attribute__((__aligned__(8)))
Indicates that the leadership preference is set through CLI and not through config file.
ClGmsLeadershipCredentialsT credential __attribute__((__aligned__(8)))
This is an integer value specifying the leadership credibility of the node.
ClBoolT isPreferredLeader __attribute__((__aligned__(8)))
Indicates if this node is the preferred leader for the cluster.
ClGmsNodeAddressT nodeIpAddress __attribute__((__aligned__(8)))
Node IP Address.
ClGmsNodeIdT nodeId __attribute__((__aligned__(8)))
Unique ID of node.
ClVersionT gmsVersion __attribute__((__aligned__(8)))
Version information of the GMS software running on the node, information is sent to the other peers i...
ClBoolT isCurrentLeader __attribute__((__aligned__(8)))
Indicates if this node is the current leader of the cluster or not.
ClTimeT bootTimestamp __attribute__((__aligned__(8)))
The time at which GMS was started on the node.
ClIocAddressT nodeAddress __attribute__((__aligned__(8)))
Physical IOC address of node.
ClNameT nodeName __attribute__((__aligned__(8)))
Textual name of node.
Buffer containing the list of nodes that forms the current view of cluster.
Definition: clClmTmsCommon.h:320
ClGmsClusterChangesT clusterChange
Describes the change in the cluster view since last notification.
Definition: clClmTmsCommon.h:329
ClGmsClusterMemberT clusterNode __attribute__((__aligned__(8)))
Node profile as described in the datatype ClGmsClusterMemberT.
Buffer to convey the view: the list of nodes and their status.
Definition: clClmTmsCommon.h:337
ClGmsClusterNotificationT * notification
Array of nodes.
Definition: clClmTmsCommon.h:351
ClGmsNodeIdT leader
Node ID of current leader.
Definition: clClmTmsCommon.h:356
ClGmsNodeIdT deputy
Node marked as deputy.
Definition: clClmTmsCommon.h:361
ClUint64T viewNumber __attribute__((__aligned__(8)))
Current view number.
ClUint32T numberOfItems
Length of notification array.
Definition: clClmTmsCommon.h:346
ClBoolT leadershipChanged
To check whether the leader has changed since the last view.
Definition: clClmTmsCommon.h:366
Parameters for group provided during group creation.
Definition: clClmTmsCommon.h:402
Structure containing attributes of a group member.
Definition: clClmTmsCommon.h:416
ClGmsLeadershipCredentialsT credential __attribute__((__aligned__(8)))
Credentials for being the leader.
ClGmsHandleT handle __attribute__((__aligned__(8)))
SVC handle of this group member.
ClBoolT memberActive __attribute__((__aligned__(8)))
True if the node is a member of group.
ClUint64T initialViewNumber __attribute__((__aligned__(8)))
The view number of the group at the time the member joined.
ClGmsMemberNameT memberName __attribute__((__aligned__(8)))
Textual name of the member.
ClTimeT joinTimestamp __attribute__((__aligned__(8)))
The instant at which the member joined the group.
ClIocAddressT memberAddress __attribute__((__aligned__(8)))
IOC Address of the group member application.
ClGmsMemberIdT memberId __attribute__((__aligned__(8)))
Group-unique ID of the member.
Buffer containing the list of group members in the requested view.
Definition: clClmTmsCommon.h:494
ClGmsGroupChangesT groupChange
Indicates the kind of change in the group membership since last notification.
Definition: clClmTmsCommon.h:503
ClGmsGroupMemberT groupMember __attribute__((__aligned__(8)))
Information on the member.
Buffer to convey the view: the list of group member attributes.
Definition: clClmTmsCommon.h:511
ClUint64T viewNumber __attribute__((__aligned__(8)))
Current view number.
ClGmsMemberIdT leader
Member ID of leader.
Definition: clClmTmsCommon.h:531
ClBoolT leadershipChanged
To check whether leader has changed since the last notification.
Definition: clClmTmsCommon.h:541
ClGmsGroupNotificationT * notification
Array of members.
Definition: clClmTmsCommon.h:526
ClUint32T numberOfItems
Length of notification array.
Definition: clClmTmsCommon.h:521
ClGmsMemberIdT deputy
Member marked as deputy.
Definition: clClmTmsCommon.h:536
Structure used to hold the metadata of a group.
Definition: clClmTmsCommon.h:549
ClUint32T noOfMembers
Number of members in the group.
Definition: clClmTmsCommon.h:568
ClTimeT creationTimestamp
Time at which group was created.
Definition: clClmTmsCommon.h:583
ClBoolT setForDelete
No more joins are allowed.
Definition: clClmTmsCommon.h:573
ClGmsGroupParamsT groupParams
Desired group parameters.
Definition: clClmTmsCommon.h:563
ClGmsGroupNameT groupName
Name of the group.
Definition: clClmTmsCommon.h:553
ClIocMulticastAddressT iocMulticastAddr
IOC multicast address created by GMS.
Definition: clClmTmsCommon.h:578
ClGmsGroupIdT groupId
Group Id.
Definition: clClmTmsCommon.h:558
ClTimeT lastChangeTimestamp
Time at which the last view changed.
Definition: clClmTmsCommon.h:588
Structure used to pass the meta data on all the existing groups.
Definition: clClmTmsCommon.h:596
ClGmsGroupInfoT * groupInfoList
Array of ClGmsGroupInfoT data.
Definition: clClmTmsCommon.h:605
ClUint32T noOfGroups
Holds the value of number of groups.
Definition: clClmTmsCommon.h:600
This callback structure is provided to the GMS library during Initialization.
Definition: clClmTmsCommon.h:810
ClGmsGroupMemberGetCallbackT clGmsGroupMemberGetCallback
This callback is called when the response comes from the server side for the async request made by th...
Definition: clClmTmsCommon.h:847
ClGmsClusterTrackCallbackT clGmsClusterTrackCallback
This callback is invoked to notify the registered user about any change in the cluster configuratio...
Definition: clClmTmsCommon.h:828
ClGmsClusterMemberGetCallbackT clGmsClusterMemberGetCallback
This callback is called when the response comes from the server side for the async request made by th...
Definition: clClmTmsCommon.h:817
ClGmsGroupTrackCallbackT clGmsGroupTrackCallback
This callback is invoked to notify the registered user about any change in the membership of a given ...
Definition: clClmTmsCommon.h:839
IOC address.
Definition: clIocApi.h:401