MySQL  8.0.19
Source Code Documentation
Pipeline_event Class Reference

#include <pipeline_interfaces.h>

Public Member Functions

 Pipeline_event (Data_packet *base_packet, Format_description_log_event *fde_event, int modifier=UNDEFINED_EVENT_MODIFIER, enum_group_replication_consistency_level consistency_level=GROUP_REPLICATION_CONSISTENCY_EVENTUAL, std::list< Gcs_member_identifier > *online_members=NULL)
 Create a new pipeline wrapper based on a packet. More...
 
 Pipeline_event (Log_event *base_event, Format_description_log_event *fde_event, int modifier=UNDEFINED_EVENT_MODIFIER, enum_group_replication_consistency_level consistency_level=GROUP_REPLICATION_CONSISTENCY_EVENTUAL, std::list< Gcs_member_identifier > *online_members=NULL)
 Create a new pipeline wrapper based on a log event. More...
 
 ~Pipeline_event ()
 
int get_FormatDescription (Format_description_log_event **out_fde)
 Return current format description event. More...
 
int get_LogEvent (Log_event **out_event)
 Return a log event. More...
 
void set_LogEvent (Log_event *in_event)
 Sets the pipeline event's log event. More...
 
void set_Packet (Data_packet *in_packet)
 Sets the pipeline event's packet. More...
 
int get_Packet (Data_packet **out_packet)
 Return a packet. More...
 
Log_event_type get_event_type ()
 Returns the event type. More...
 
void mark_event (int modifier)
 Sets the event context flag. More...
 
int get_event_context ()
 Returns the event context flag. More...
 
void reset_pipeline_event ()
 Resets all variables in the event for reuse. More...
 
enum_group_replication_consistency_level get_consistency_level ()
 Get transaction consistency level. More...
 
std::list< Gcs_member_identifier > * get_online_members ()
 Get the list of ONLINE Group members when a Transaction_with_guarantee_message message was received, or NULL if if any group member version is from a version lower than TRANSACTION_WITH_GUARANTEES_VERSION. More...
 
void release_online_members_memory_ownership ()
 Release memory ownership of m_online_members. More...
 

Private Member Functions

int convert_packet_to_log_event ()
 Converts the existing packet into a log event. More...
 
int convert_log_event_to_packet ()
 Converts the existing log event into a packet. More...
 

Private Attributes

Data_packetpacket
 
Log_eventlog_event
 
int event_context
 
Format_description_log_eventformat_descriptor
 
enum_group_replication_consistency_level m_consistency_level
 
std::list< Gcs_member_identifier > * m_online_members
 
bool m_online_members_memory_ownership
 

Detailed Description

A wrapper for log events/packets. This class allows for the marking of events and its transformation between the packet and log event formats as requested in the interface.

Note
Events can be marked as with event modifiers. This is a generic field allowing modifiers to vary with use context. If not specified, this field has a default value of 0.

Constructor & Destructor Documentation

◆ Pipeline_event() [1/2]

Pipeline_event::Pipeline_event ( Data_packet base_packet,
Format_description_log_event fde_event,
int  modifier = UNDEFINED_EVENT_MODIFIER,
enum_group_replication_consistency_level  consistency_level = GROUP_REPLICATION_CONSISTENCY_EVENTUAL,
std::list< Gcs_member_identifier > *  online_members = NULL 
)
inline

Create a new pipeline wrapper based on a packet.

Note
If a modifier is not provided the event will be marked as UNDEFINED
Parameters
[in]base_packetthe wrapper packet
[in]fde_eventthe format description event for conversions
[in]modifierthe event modifier
[in]consistency_levelthe transaction consistency level
[in]online_membersthe ONLINE members when the transaction message was delivered

◆ Pipeline_event() [2/2]

Pipeline_event::Pipeline_event ( Log_event base_event,
Format_description_log_event fde_event,
int  modifier = UNDEFINED_EVENT_MODIFIER,
enum_group_replication_consistency_level  consistency_level = GROUP_REPLICATION_CONSISTENCY_EVENTUAL,
std::list< Gcs_member_identifier > *  online_members = NULL 
)
inline

Create a new pipeline wrapper based on a log event.

Note
If a modifier is not provided the event will be marked as UNDEFINED
Parameters
[in]base_eventthe wrapper log event
[in]fde_eventthe format description event for conversions
[in]modifierthe event modifier
[in]consistency_levelthe transaction consistency level
[in]online_membersthe ONLINE members when the transaction message was delivered

◆ ~Pipeline_event()

Pipeline_event::~Pipeline_event ( )
inline

Member Function Documentation

◆ convert_log_event_to_packet()

int Pipeline_event::convert_log_event_to_packet ( )
inlineprivate

Converts the existing log event into a packet.

Returns
the operation status
Return values
0OK
!=0Error on log event conversion

◆ convert_packet_to_log_event()

int Pipeline_event::convert_packet_to_log_event ( )
inlineprivate

Converts the existing packet into a log event.

Returns
the operation status
Return values
0OK
1Error on packet conversion

◆ get_consistency_level()

enum_group_replication_consistency_level Pipeline_event::get_consistency_level ( )
inline

Get transaction consistency level.

◆ get_event_context()

int Pipeline_event::get_event_context ( )
inline

Returns the event context flag.

Returns

◆ get_event_type()

Log_event_type Pipeline_event::get_event_type ( )
inline

Returns the event type.

Be it a Log_event or Packet, it's marked with a type we can extract.

Returns
the pipeline event type

◆ get_FormatDescription()

int Pipeline_event::get_FormatDescription ( Format_description_log_event **  out_fde)
inline

Return current format description event.

Parameters
[out]out_fdethe outputted format description event
Returns
Operation status
Return values
0OK

◆ get_LogEvent()

int Pipeline_event::get_LogEvent ( Log_event **  out_event)
inline

Return a log event.

If one does not exist, the contained packet will be converted into one.

Parameters
[out]out_eventthe outputted log event
Returns
Operation status
Return values
0OK
!=0error on conversion

◆ get_online_members()

std::list<Gcs_member_identifier>* Pipeline_event::get_online_members ( )
inline

Get the list of ONLINE Group members when a Transaction_with_guarantee_message message was received, or NULL if if any group member version is from a version lower than TRANSACTION_WITH_GUARANTEES_VERSION.

For Transaction_message messages it always return NULL

Returns
list of all ONLINE members, if all members have version equal or greater than TRANSACTION_WITH_GUARANTEES_VERSION for Transaction_with_guarantee_message messages otherwise NULL
Note
the memory allocated for the list ownership belongs to the caller

◆ get_Packet()

int Pipeline_event::get_Packet ( Data_packet **  out_packet)
inline

Return a packet.

If one does not exist, the contained log event will be converted into one.

Parameters
[out]out_packetthe outputted packet
Returns
the operation status
Return values
0OK
!=0error on conversion

◆ mark_event()

void Pipeline_event::mark_event ( int  modifier)
inline

Sets the event context flag.

Parameters
[in]modifierthe event modifier

◆ release_online_members_memory_ownership()

void Pipeline_event::release_online_members_memory_ownership ( )
inline

Release memory ownership of m_online_members.

◆ reset_pipeline_event()

void Pipeline_event::reset_pipeline_event ( )
inline

Resets all variables in the event for reuse.

Possible existing events/packets are deleted. The context flag is reset to UNDEFINED. Error messages are deleted.

Format description events, are NOT deleted. This is due to the fact that they are given, and do not belong to the pipeline event.

Transaction consistency level is not reset, despite the event is reset, consistency level belongs to the transaction.

◆ set_LogEvent()

void Pipeline_event::set_LogEvent ( Log_event in_event)
inline

Sets the pipeline event's log event.

Note
This methods assume you have called reset_pipeline_event
Parameters
[in]in_eventthe given log event

◆ set_Packet()

void Pipeline_event::set_Packet ( Data_packet in_packet)
inline

Sets the pipeline event's packet.

Note
This methods assume you have called reset_pipeline_event
Parameters
[in]in_packetthe given packet

Member Data Documentation

◆ event_context

int Pipeline_event::event_context
private

◆ format_descriptor

Format_description_log_event* Pipeline_event::format_descriptor
private

◆ log_event

Log_event* Pipeline_event::log_event
private

◆ m_consistency_level

enum_group_replication_consistency_level Pipeline_event::m_consistency_level
private

◆ m_online_members

std::list<Gcs_member_identifier>* Pipeline_event::m_online_members
private

◆ m_online_members_memory_ownership

bool Pipeline_event::m_online_members_memory_ownership
private

◆ packet

Data_packet* Pipeline_event::packet
private

The documentation for this class was generated from the following file: