![]() |
MySQL 26.7.0
Source Code Documentation
|
Represents metadata of a set of events, capable of being fetched from a storage. More...
#include <event_set_fetchable.h>
Public Types | |
| using | Fde_type = Format_description_log_event |
| using | Fde_ptr = Fde_type * |
| using | Log_event_ptr = std::shared_ptr< Log_event > |
Public Member Functions | |
| virtual bool | wait_next ()=0 |
| Waits until the next event can be fetched. More... | |
| virtual std::optional< Managed_event > | fetch_next ()=0 |
| Fetches the next event if possible. More... | |
| virtual bool | is_done () const =0 |
| Checks if the event set has been fully fetched successfully. More... | |
| virtual bool | is_error () const =0 |
| Checks if an error occurred during fetching. More... | |
| virtual const std::string & | get_error_str () const =0 |
| Retrieves the error message if an error occurred. More... | |
| virtual void | reset (bool reset_events)=0 |
| Resets the state to allow fetching the event set again, also clearing any error state. More... | |
| virtual bool | is_trx () const =0 |
| Checks if this event set represents a complete transaction. More... | |
| virtual Fde_ptr | get_fde ()=0 |
| Obtains non-owning pointer to current transaction FDE. More... | |
| virtual | ~Event_set_fetchable ()=default |
| Sets the end of the stream if needed. More... | |
| virtual void | set_success () |
| Callback on success, default - do nothing. More... | |
Represents metadata of a set of events, capable of being fetched from a storage.
Typically, one event set will contain metadata of a part of, or a whole transaction. Event_set_fetchable supplies a function to fetch consecutive Log_event objects. If needed, it decompresses the underlying event stream. A transaction contains one or many fetchable event sets; this is decided by a specific implementation of a storage reader (e.g., relay log storage reader will keep separate event sets for parts of transaction kept in separate files). The specific implementation of a fetchable event set is driven by the implementation of the storage type (see Event_set_fetchable_relay_log).
| using mysql::csa::Event_set_fetchable::Log_event_ptr = std::shared_ptr<Log_event> |
|
virtualdefault |
Sets the end of the stream if needed.
Empty by default.
Virtual destructor.
|
pure virtual |
Fetches the next event if possible.
Callers are expected to wait for availability with wait_next() first when the underlying implementation supports streaming updates.
Implemented in mysql::csa::Event_set_fetchable_cache, and mysql::csa::Event_set_fetchable_relay_log.
|
pure virtual |
Retrieves the error message if an error occurred.
Implemented in mysql::csa::Event_set_fetchable_cache, and mysql::csa::Event_set_fetchable_relay_log.
|
pure virtual |
Obtains non-owning pointer to current transaction FDE.
Implemented in mysql::csa::Event_set_fetchable_cache, and mysql::csa::Event_set_fetchable_relay_log.
|
pure virtual |
Checks if the event set has been fully fetched successfully.
Implemented in mysql::csa::Event_set_fetchable_cache, and mysql::csa::Event_set_fetchable_relay_log.
|
pure virtual |
Checks if an error occurred during fetching.
Implemented in mysql::csa::Event_set_fetchable_cache, and mysql::csa::Event_set_fetchable_relay_log.
|
pure virtual |
Checks if this event set represents a complete transaction.
Implemented in mysql::csa::Event_set_fetchable_cache, and mysql::csa::Event_set_fetchable_relay_log.
|
pure virtual |
Resets the state to allow fetching the event set again, also clearing any error state.
| reset_events | When true events states need to be reset |
Implemented in mysql::csa::Event_set_fetchable_cache, and mysql::csa::Event_set_fetchable_relay_log.
|
inlinevirtual |
Callback on success, default - do nothing.
Reimplemented in mysql::csa::Event_set_fetchable_cache, and mysql::csa::Event_set_fetchable_relay_log.
|
pure virtual |
Waits until the next event can be fetched.
Implemented in mysql::csa::Event_set_fetchable_cache, and mysql::csa::Event_set_fetchable_relay_log.