MySQL 9.0.0
Source Code Documentation
Binlog_ifile Class Reference

Binlog input file. More...

#include <binlog_istream.h>

Inheritance diagram for Binlog_ifile:

Public Member Functions

 Basic_binlog_ifile (Binlog_read_error *binlog_read_error)
 Basic_binlog_ifile (const Basic_binlog_ifile &)=delete
- Public Member Functions inherited from Basic_binlog_ifile
 Basic_binlog_ifile (Binlog_read_error *binlog_read_error)
 Basic_binlog_ifile (const Basic_binlog_ifile &)=delete
Basic_binlog_ifileoperator= (const Basic_binlog_ifile &)=delete
 ~Basic_binlog_ifile () override
bool open (const char *file_name)
 Open a binlog file. More...
void close ()
 Close the binlog file it is reading. More...
ssize_t read (unsigned char *buffer, size_t length) override
 Read some bytes from the input stream. More...
bool seek (my_off_t position) override
 Puts the read position to a given offset. More...
my_off_t position () const
bool is_open () const
const std::string & file_name () const
my_off_t length () override
 Get length of the binlog file. More...
- Public Member Functions inherited from Basic_seekable_istream
 ~Basic_seekable_istream () override=default
- Public Member Functions inherited from Basic_istream
virtual ~Basic_istream ()=default

Protected Member Functions

std::unique_ptr< Basic_seekable_istreamopen_file (const char *file_name) override
 Open the system layer file. More...

Additional Inherited Members

- Protected Attributes inherited from Basic_binlog_ifile
 It is convenient for caller to share a Binlog_read_error object between streams. More...

Detailed Description

Binlog input file.

It is responsible for opening binlog files generated by the server itself, but not relaylog files.

Member Function Documentation

◆ Basic_binlog_ifile() [1/2]

Basic_binlog_ifile::Basic_binlog_ifile ( Binlog_read_error binlog_read_error)
[in]binlog_read_errorBasic_binlog_ifile doesn't own an Binlog_read_error. So the caller should provide one to it. When error happens, the error type will be set into 'error'.

◆ Basic_binlog_ifile() [2/2]

Basic_binlog_ifile::Basic_binlog_ifile ( const Basic_binlog_ifile )

◆ open_file()

std::unique_ptr< Basic_seekable_istream > Binlog_ifile::open_file ( const char *  file_name)

Open the system layer file.

It is the entry of the stream pipeline. Implementation is delegated to sub-classes. Sub-classes opens system layer files in different way.

[in]file_namename of the binlog file which will be opened.

Implements Basic_binlog_ifile.

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