MySQL 8.0.40
Source Code Documentation
|
#include <event_cataloger.h>
Public Member Functions | |
Event_cataloger () | |
int | handle_event (Pipeline_event *ev, Continuation *cont) override |
Handling of an event as defined in the handler implementation. More... | |
int | handle_action (Pipeline_action *action) override |
Handling of an action as defined in the handler implementation. More... | |
int | initialize () override |
Initialization as defined in the handler implementation. More... | |
int | terminate () override |
Terminate the execution as defined in the handler implementation. More... | |
bool | is_unique () override |
This method identifies the handler as being unique. More... | |
int | get_role () override |
This method returns the handler role. More... | |
Public Member Functions inherited from Event_handler | |
Event_handler () | |
virtual | ~Event_handler ()=default |
void | plug_next_handler (Event_handler *next_handler) |
Plug an handler to be the next in line for execution. More... | |
void | append (Event_handler *last_handler) |
Append an handler to be the last in line for execution. More... | |
int | terminate_pipeline () |
Shutdown and delete all handlers in the pipeline. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Event_handler | |
static void | append_handler (Event_handler **pipeline, Event_handler *event_handler) |
Append an handler to a given pipeline. More... | |
static void | get_handler_by_role (Event_handler *pipeline, int role, Event_handler **event_handler) |
Returns an handler that plays the given role. More... | |
Protected Member Functions inherited from Event_handler | |
int | next (Pipeline_event *event, Continuation *continuation) |
Pass the event to the next handler in line. More... | |
int | next (Pipeline_action *action) |
Pass the action to the next handler in line. More... | |
|
default |
|
overridevirtual |
This method returns the handler role.
Handlers can have different roles according to the tasks they represent. Is based on this role that certain components can extract and interact with pipeline handlers. This means that if a role is given to a singleton handler, no one else can have that role.
Implements Event_handler.
|
overridevirtual |
Handling of an action as defined in the handler implementation.
As the handler can be included in a pipeline, somewhere in the method, the handler.next(action) method shall be invoked to allow the passing of the action to the next handler.
[in] | action | the pipeline event to be handled |
Implements Event_handler.
|
overridevirtual |
Handling of an event as defined in the handler implementation.
As the handler can be included in a pipeline, somewhere in the method, the handler.next(event,continuation) method shall be invoked to allow the passing of the event to the next handler.
Also, if an error occurs, the continuation object shall be used to propagate such error. This class can also be used to know/report when the transaction to whom the event belongs was discarded.
[in] | event | the pipeline event to be handled |
[in,out] | continuation | termination notification object. |
Implements Event_handler.
|
overridevirtual |
Initialization as defined in the handler implementation.
Implements Event_handler.
|
overridevirtual |
This method identifies the handler as being unique.
An handler that is defined as unique is an handler that cannot be used more than once in a pipeline. Such tasks as certification and event application can only be done once. Unique handlers are also the only that, by being one of a kind, can be extracted during the pipeline life allowing dynamic changes to them.
true | is a unique handler |
false | is a repeatable handler |
Implements Event_handler.
|
overridevirtual |
Terminate the execution as defined in the handler implementation.
Implements Event_handler.