![]() |
MySQL 26.7.0
Source Code Documentation
|
#include <commit_order_clock.h>
Public Types | |
| using | Time_point_t = uint64_t |
Public Types inherited from mysql::scheduler::Scheduler_clock | |
| using | Time_point_t = uint64_t |
Public Member Functions | |
| Commit_order_clock (Time_point_t start_point=0) | |
| Constructor. More... | |
| Time_point_t | start_time () const override |
| Gets clock start time. More... | |
| Time_point_t | now () const override |
| Gets current time, i.e. More... | |
| bool | add_time (Task_id task_id, Time_point_t time) override |
| Subscribes a task to time processing window. More... | |
| bool | tick (Task_id task_id, Time_point_t time) override |
| Notify that task finished execution. More... | |
| Scheduler_dependency_type | get_type () const override |
| This clock dependency type is start-to-start. More... | |
Public Member Functions inherited from mysql::scheduler::Scheduler_clock | |
| virtual | ~Scheduler_clock ()=default |
| Destructor. More... | |
| virtual bool | advances_independently () const |
| Returns property of a clock - information on whether this clock is steered by task ticks or advances independently. More... | |
| virtual bool | try_unblock () |
| Maintenance function for unblocking the clock. More... | |
Private Attributes | |
| std::atomic< Time_point_t > | m_clock {0} |
| Current clock value (now / delay from the start point) More... | |
| std::atomic< std::size_t > | m_twicked_count {0} |
| Used to track stalled clock unblocking (clock was twicked by this count) More... | |
| using mysql::scheduler::Commit_order_clock::Time_point_t = uint64_t |
| mysql::scheduler::Commit_order_clock::Commit_order_clock | ( | Time_point_t | start_point = 0 | ) |
Constructor.
| start_point | Clock start point (set as now time) |
|
overridevirtual |
Subscribes a task to time processing window.
| task_id | Unused task ID |
| time | Time window to which a task will be subscribed |
Implements mysql::scheduler::Scheduler_clock.
|
inlineoverridevirtual |
This clock dependency type is start-to-start.
Reimplemented from mysql::scheduler::Scheduler_clock.
|
overridevirtual |
Gets current time, i.e.
current processing window value
Implements mysql::scheduler::Scheduler_clock.
|
overridevirtual |
|
overridevirtual |
Notify that task finished execution.
Called by asynchronous workers executing task. When specific conditions are met, tick will advance the internal clock value.
| task_id | Unused task ID |
| time | Delay value the task was subscribed to |
Implements mysql::scheduler::Scheduler_clock.
|
private |
Current clock value (now / delay from the start point)
|
private |
Used to track stalled clock unblocking (clock was twicked by this count)