MySQL 9.1.0
Source Code Documentation
notification.cc File Reference

Typedefs

typedef int(* svc_notify_func) (Notification_context &, my_h_service)
 

Enumerations

enum  SvcTypes { kGroupMembership = 0 , kGroupMemberStatus }
 

Functions

static int notify_group_membership (Notification_context &ctx, my_h_service svc)
 
static int notify_group_member_status (Notification_context &ctx, my_h_service svc)
 
static bool notify (SvcTypes svc_type, Notification_context &ctx)
 Auxiliary function to engage the service registry to notify a set of listeners. More...
 
bool notify_and_reset_ctx (Notification_context &ctx)
 This function SHALL trigger the notifications based on the notification context provided as an argument. More...
 

Typedef Documentation

◆ svc_notify_func

typedef int(* svc_notify_func) (Notification_context &, my_h_service)

Enumeration Type Documentation

◆ SvcTypes

enum SvcTypes
Enumerator
kGroupMembership 
kGroupMemberStatus 

Function Documentation

◆ notify()

static bool notify ( SvcTypes  svc_type,
Notification_context ctx 
)
static

Auxiliary function to engage the service registry to notify a set of listeners.

Parameters
svc_typeThe service name.
ctxThe events context
Returns
false on success, true otherwise.

◆ notify_and_reset_ctx()

bool notify_and_reset_ctx ( Notification_context ctx)

This function SHALL trigger the notifications based on the notification context provided as an argument.

Different notifications SHALL be emitted depending on what is flagged.

It calls out into those services that have registered themselves in the server service registry as listeners for the notifications such as view changes, or member state changes.

If an error is returned it can be that part of the notifications have succeeded and part have not.

Note
The assumption is that this function is fast, i.e., consumers SHALL implement a notification handling system that will release the caller thread immediately after they receive the notification.
Parameters
ctxThe notification context.

◆ notify_group_member_status()

static int notify_group_member_status ( Notification_context ctx,
my_h_service  svc 
)
static

◆ notify_group_membership()

static int notify_group_membership ( Notification_context ctx,
my_h_service  svc 
)
static