MySQL 26.7.0
Source Code Documentation
mysql::csa::Managed_event Class Reference

Managed event. More...

#include <managed_event.h>

Public Types

using Log_event_ptr = std::shared_ptr< Log_event >
 

Public Member Functions

 Managed_event ()=default
 Construct. More...
 
 Managed_event (const Log_event_ptr &ev, bool ev_owns_memory)
 Construct from ev. More...
 
Log_event_ptrget_event ()
 Internal event accessor. More...
 
const Log_event_ptrget_event () const
 Internal event accessor, const. More...
 
void set_last_in_transaction (bool is_last)
 Marks whether this fetched event is the last event of transaction. More...
 
bool is_last_in_transaction () const
 Returns whether this fetched event is the last event of transaction. More...
 
 operator bool () const noexcept
 Returns true if Managed_event manages an event, false otherwise. More...
 

Private Attributes

Log_event_ptr m_event
 Internal event pointer. More...
 
bool m_is_last_in_transaction {false}
 True if this fetched event is the transaction terminal event. More...
 

Detailed Description

Managed event.

For now, it contains functionality to pass memory ownership between CSA threads.

Member Typedef Documentation

◆ Log_event_ptr

Constructor & Destructor Documentation

◆ Managed_event() [1/2]

mysql::csa::Managed_event::Managed_event ( )
default

Construct.

◆ Managed_event() [2/2]

mysql::csa::Managed_event::Managed_event ( const Log_event_ptr ev,
bool  ev_owns_memory 
)

Construct from ev.

Parameters
evPointer to copy
ev_owns_memoryTrue if ev exclusively owns log event memory

Member Function Documentation

◆ get_event() [1/2]

Managed_event::Log_event_ptr & mysql::csa::Managed_event::get_event ( )

Internal event accessor.

Returns
Reference to internal event

◆ get_event() [2/2]

const Managed_event::Log_event_ptr & mysql::csa::Managed_event::get_event ( ) const

Internal event accessor, const.

Returns
Reference to internal event

◆ is_last_in_transaction()

bool mysql::csa::Managed_event::is_last_in_transaction ( ) const

Returns whether this fetched event is the last event of transaction.

◆ operator bool()

mysql::csa::Managed_event::operator bool ( ) const
explicitnoexcept

Returns true if Managed_event manages an event, false otherwise.

◆ set_last_in_transaction()

void mysql::csa::Managed_event::set_last_in_transaction ( bool  is_last)

Marks whether this fetched event is the last event of transaction.

Member Data Documentation

◆ m_event

Log_event_ptr mysql::csa::Managed_event::m_event
private

Internal event pointer.

◆ m_is_last_in_transaction

bool mysql::csa::Managed_event::m_is_last_in_transaction {false}
private

True if this fetched event is the transaction terminal event.


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