![]() |
MySQL 26.7.0
Source Code Documentation
|
Implementation of the Basic_binlog_ifile, which works on the prefetched stream (Istream_prefetched) Exposes additional function to set prefetcher (since legacy design does not allow to use a custom constructor - see Basic_binlog_file_reader). More...
#include <prefetched_ifile.h>
Public Member Functions | |
| void | set_prefetcher (Log_prefetcher_sptr prefetcher) |
| Sets the prefetcher. More... | |
| 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_ifile & | operator= (const Basic_binlog_ifile &)=delete |
| virtual | ~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 | |
| virtual | ~Basic_seekable_istream () override=default |
Public Member Functions inherited from Basic_istream | |
| virtual | ~Basic_istream ()=default |
Protected Member Functions | |
| std::unique_ptr< Basic_seekable_istream > | open_file (const char *file_name) override |
| Creates stream object "from the file". More... | |
Protected Attributes | |
| std::string | m_current_file |
| File currently opened. More... | |
| Log_prefetcher_sptr | m_prefetcher |
| Prefetcher object we need to pass into created stream. More... | |
Protected Attributes inherited from Basic_binlog_ifile | |
| Binlog_read_error * | m_error |
| It is convenient for caller to share a Binlog_read_error object between streams. More... | |
Implementation of the Basic_binlog_ifile, which works on the prefetched stream (Istream_prefetched) Exposes additional function to set prefetcher (since legacy design does not allow to use a custom constructor - see Basic_binlog_file_reader).
| Basic_binlog_ifile::Basic_binlog_ifile | ( | Binlog_read_error * | binlog_read_error | ) |
| [in] | binlog_read_error | Basic_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'. |
|
delete |
|
overrideprotectedvirtual |
Creates stream object "from the file".
Data will be obtained via prefetcher
Implements Basic_binlog_ifile.
| void mysql::csa::Prefetched_ifile::set_prefetcher | ( | Log_prefetcher_sptr | prefetcher | ) |
Sets the prefetcher.
Prefetcher must be set before opening the first file. Later on, same prefetcher object is reused to initialize Istream_prefetched object, which uses asynchronous prefetcher to get data.
| prefetcher | Shared prefetcher object. |
|
protected |
File currently opened.
|
protected |
Prefetcher object we need to pass into created stream.