MySQL 8.0.40
Source Code Documentation
|
Binary codec for the heartbeat log event. More...
#include <binary.h>
Public Types | |
enum | fields { OTW_HB_HEADER_END_MARK = 0 , OTW_HB_LOG_FILENAME_FIELD = 1 , OTW_HB_LOG_POSITION_FIELD = 2 } |
The on-the-wire fields. More... | |
Public Member Functions | |
Heartbeat () | |
std::pair< std::size_t, bool > | decode (const unsigned char *from, std::size_t size, Binary_log_event &to) const override |
This member function shall decode the contents of the buffer provided and fill in the event referenced. More... | |
std::pair< std::size_t, bool > | encode (const Binary_log_event &from, unsigned char *to, std::size_t size) const override |
This member function shall encode the contents of the event referenced and store the result in the buffer provided. More... | |
Public Member Functions inherited from binary_log::codecs::binary::Base_codec | |
~Base_codec () override=default | |
Public Member Functions inherited from binary_log::codecs::Codec | |
virtual | ~Codec ()=default |
Additional Inherited Members | |
Protected Member Functions inherited from binary_log::codecs::binary::Base_codec | |
Event_reader & | reader () |
Protected Attributes inherited from binary_log::codecs::binary::Base_codec | |
Event_reader * | m_reader |
Binary codec for the heartbeat log event.
|
inline |
|
overridevirtual |
This member function shall decode the contents of the buffer provided and fill in the event referenced.
This is the decoder member function for decoding heartbeats.
Note that the event provided needs to be of type HEARTBEAT_EVENT_V2.
from | the buffer to decode |
size | the size of the buffer to decode. |
to | the event to store the decoded information into. |
Note that the log event must have the appropriate type code: HEARTBEAT_LOG_EVENT to be compatible with this specific decoder. If it is not, an error shall be returned
from | the buffer to decode from. |
size | the buffer size. |
to | The log event to decode to. |
Implements binary_log::codecs::binary::Base_codec.
|
overridevirtual |
This member function shall encode the contents of the event referenced and store the result in the buffer provided.
This is the encoder member function for the heartbeat event.
Note that the event referenced needs to be of type HEARTBEAT_EVENT_V2.
from | the event to encode. |
to | the buffer where to store the encoded event. |
size | the size of the buffer. |
Note that the log event must have the appropriate type code: HEARTBEAT_LOG_EVENT to be compatible with this specific enccoder. If it is not, an error shall be returned
from | The log event to decode to. |
to | the buffer to decode from. |
size | the buffer size. |
Implements binary_log::codecs::binary::Base_codec.