MySQL 8.0.39
Source Code Documentation
Gcs_log_event Class Reference

Entry or element in the circular buffer maintained by the Gcs_async_buffer responsible for storing a message that will eventually be asynchronously written to a sink. More...

#include <gcs_logging_system.h>

Public Member Functions

 Gcs_log_event ()=default
 
void set_event (bool ready)
 Set whether the message is ready to be consumed or not. More...
 
bool flush_event (Sink_interface &sink)
 Write the current message into a sink. More...
 
char * get_buffer ()
 Get a reference to a buffer entry that holds a message that will be eventually written to a sink. More...
 
size_t get_buffer_size () const
 Get the content size provided it was already filled in. More...
 
size_t get_max_buffer_size () const
 Get the maximum buffer size. More...
 
void set_buffer_size (size_t message_size)
 Set the message's size. More...
 

Private Member Functions

 Gcs_log_event (const Gcs_log_event &other)
 
Gcs_log_eventoperator= (const Gcs_log_event &e)
 

Private Attributes

char m_message_buffer [GCS_MAX_LOG_BUFFER] {}
 Buffer to hold a message that will eventually be written to a sink. More...
 
size_t m_message_size {0}
 
std::atomic< bool > m_ready_flag {false}
 Flag used to indicate whether the message can be consumed or not. More...
 

Detailed Description

Entry or element in the circular buffer maintained by the Gcs_async_buffer responsible for storing a message that will eventually be asynchronously written to a sink.

Constructor & Destructor Documentation

◆ Gcs_log_event() [1/2]

Gcs_log_event::Gcs_log_event ( )
explicitdefault

◆ Gcs_log_event() [2/2]

Gcs_log_event::Gcs_log_event ( const Gcs_log_event other)
private

Member Function Documentation

◆ flush_event()

bool Gcs_log_event::flush_event ( Sink_interface sink)
inline

Write the current message into a sink.

Parameters
sinkWhere the message should be written to.
Return values
Currently,italways false.

◆ get_buffer()

char * Gcs_log_event::get_buffer ( )
inline

Get a reference to a buffer entry that holds a message that will be eventually written to a sink.

◆ get_buffer_size()

size_t Gcs_log_event::get_buffer_size ( ) const
inline

Get the content size provided it was already filled in.

Otherwise, an unknown value is returned.

◆ get_max_buffer_size()

size_t Gcs_log_event::get_max_buffer_size ( ) const
inline

Get the maximum buffer size.

◆ operator=()

Gcs_log_event & Gcs_log_event::operator= ( const Gcs_log_event e)
private

◆ set_buffer_size()

void Gcs_log_event::set_buffer_size ( size_t  message_size)
inline

Set the message's size.

◆ set_event()

void Gcs_log_event::set_event ( bool  ready)
inline

Set whether the message is ready to be consumed or not.

Member Data Documentation

◆ m_message_buffer

char Gcs_log_event::m_message_buffer[GCS_MAX_LOG_BUFFER] {}
private

Buffer to hold a message that will eventually be written to a sink.

◆ m_message_size

size_t Gcs_log_event::m_message_size {0}
private

◆ m_ready_flag

std::atomic<bool> Gcs_log_event::m_ready_flag {false}
private

Flag used to indicate whether the message can be consumed or not.


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