MySQL  8.0.22
Source Code Documentation
binary_log::transaction::compression::Iterable_buffer Class Reference

This is a commodity iterator over a buffer containing binlog events inside. More...

#include <iterator.h>

Classes

class  iterator
 Iterator class to allow iterating over a compressed log event buffer. More...
 

Public Member Functions

 Iterable_buffer (const char *buffer, size_t buffer_size)
 Iterable buffer over an input buffer. More...
 
 Iterable_buffer (const char *buffer, size_t buffer_size, size_t uncompressed_size, CompType comp_algo)
 Iterable buffer over a compressed input buffer. More...
 
virtual ~Iterable_buffer ()
 Deletes the iterator and frees any buffers allocated during while the iterator was in use. More...
 
 Iterable_buffer (const Iterable_buffer &rhs)=delete
 
 Iterable_buffer (Iterable_buffer &&rhs)=delete
 
Iterable_bufferoperator= (const Iterable_buffer &rhs)=delete
 
Iterable_bufferoperator= (Iterable_buffer &&rhs)=delete
 
iterator begin ()
 
iterator end ()
 

Private Types

using CompType = binary_log::transaction::compression::type
 

Private Attributes

const char * m_compressed_buffer {nullptr}
 
size_t m_compressed_buffer_size {0}
 
std::unique_ptr< Decompressorm_decoder {nullptr}
 
const char * m_decompressed_buffer {nullptr}
 
size_t m_decompressed_buffer_size {0}
 

Friends

class iterator
 

Detailed Description

This is a commodity iterator over a buffer containing binlog events inside.

This buffer may be compressed, in which case, this class shall decompress the buffer itself and provide the iterator.

If iterating over a compressed buffer, this iterator shall allocate memory internally to handle this. However, the ownership of this memory is never handed over to any external entity and as such, it is freed when this iterator is destroyed.

Member Typedef Documentation

◆ CompType

Constructor & Destructor Documentation

◆ Iterable_buffer() [1/4]

binary_log::transaction::compression::Iterable_buffer::Iterable_buffer ( const char *  buffer,
size_t  buffer_size 
)

Iterable buffer over an input buffer.

Parameters
bufferinput buffer
buffer_sizethe input buffer size

◆ Iterable_buffer() [2/4]

binary_log::transaction::compression::Iterable_buffer::Iterable_buffer ( const char *  buffer,
size_t  buffer_size,
size_t  uncompressed_size,
CompType  comp_algo 
)

Iterable buffer over a compressed input buffer.

Parameters
bufferinput buffer
buffer_sizethe input buffer size
uncompressed_sizethe size of the data uncompressed
comp_algothe compression algorythm (e.g., ZSTD)

◆ ~Iterable_buffer()

binary_log::transaction::compression::Iterable_buffer::~Iterable_buffer ( )
virtual

Deletes the iterator and frees any buffers allocated during while the iterator was in use.

◆ Iterable_buffer() [3/4]

binary_log::transaction::compression::Iterable_buffer::Iterable_buffer ( const Iterable_buffer rhs)
delete

◆ Iterable_buffer() [4/4]

binary_log::transaction::compression::Iterable_buffer::Iterable_buffer ( Iterable_buffer &&  rhs)
delete

Member Function Documentation

◆ begin()

Iterable_buffer::iterator binary_log::transaction::compression::Iterable_buffer::begin ( )

◆ end()

Iterable_buffer::iterator binary_log::transaction::compression::Iterable_buffer::end ( )

◆ operator=() [1/2]

Iterable_buffer& binary_log::transaction::compression::Iterable_buffer::operator= ( const Iterable_buffer rhs)
delete

◆ operator=() [2/2]

Iterable_buffer& binary_log::transaction::compression::Iterable_buffer::operator= ( Iterable_buffer &&  rhs)
delete

Friends And Related Function Documentation

◆ iterator

friend class iterator
friend

Member Data Documentation

◆ m_compressed_buffer

const char* binary_log::transaction::compression::Iterable_buffer::m_compressed_buffer {nullptr}
private

◆ m_compressed_buffer_size

size_t binary_log::transaction::compression::Iterable_buffer::m_compressed_buffer_size {0}
private

◆ m_decoder

std::unique_ptr<Decompressor> binary_log::transaction::compression::Iterable_buffer::m_decoder {nullptr}
private

◆ m_decompressed_buffer

const char* binary_log::transaction::compression::Iterable_buffer::m_decompressed_buffer {nullptr}
private

◆ m_decompressed_buffer_size

size_t binary_log::transaction::compression::Iterable_buffer::m_decompressed_buffer_size {0}
private

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