![]() |
MySQL 26.7.0
Source Code Documentation
|
Represents Schedule for one-shot, delayed task. More...
#include <delayed_schedule.h>
Public Member Functions | |
| Delayed_schedule (Task_id task_id, Scheduler_clock_ptr clock, uint64_t delay) | |
| Constructor. More... | |
| bool | next () override |
| This function modifies the state of the schedule to next state. More... | |
| const Time_delay_type & | get_task_delay () const override |
| Gets information about next execution time. More... | |
| bool | is_finished () const override |
| const Scheduler_clock_ptr & | get_clock () const override |
| Obtain task clock. More... | |
| const Task_id & | get_id () const override |
| Obtain task id. More... | |
Public Member Functions inherited from mysql::scheduler::Task_schedule | |
| Task_schedule () | |
| Constructor sets the task delay to a given value. More... | |
| bool | has_higher_priority (const Task_schedule &arg, int phase) const |
| Compare two task schedules to indicate which task should run first. More... | |
| virtual | ~Task_schedule ()=default |
| Destructor. More... | |
| virtual const Scheduler_clock_ptr & | get_phase_clock (unsigned int) const |
| Obtain task clock for the given phase (current one by default) More... | |
| virtual const Time_delay_type & | get_phase_delay (unsigned int) const |
| Obtains task execution point as a delay from the clock start, but for the given phase (current one by default) More... | |
| virtual unsigned int | get_phase_id () const |
| Returns current phase id (sequence number), 0 by default. More... | |
| void | set_enqueued_by_scheduler () |
| Sets the flag indicating that the task was enqueued by the scheduler. More... | |
| bool | is_enqueued_by_scheduler () const |
| Checks if the task was enqueued by the scheduler. More... | |
| bool | is_phase_ready () const |
| Checks if the current phase is ready for execution. More... | |
| void | set_phase_ready () |
| Sets the phase ready flag to true. More... | |
Private Attributes | |
| Task_id | m_task_id |
| This task id. More... | |
| Scheduler_clock_ptr | m_clock |
| Clock this schedule is based on. More... | |
| uint64_t | m_task_delay |
| Delay since clock start point. More... | |
Represents Schedule for one-shot, delayed task.
| mysql::scheduler::Delayed_schedule::Delayed_schedule | ( | Task_id | task_id, |
| Scheduler_clock_ptr | clock, | ||
| uint64_t | delay | ||
| ) |
Constructor.
constructs schedule with delay us from the clock start point
| task_id | Task identifier |
| clock | Scheduler clock |
| delay | Delay in microseconds |
|
overridevirtual |
Obtain task clock.
Implements mysql::scheduler::Task_schedule.
|
overridevirtual |
Obtain task id.
Implements mysql::scheduler::Task_schedule.
|
overridevirtual |
Gets information about next execution time.
Implements mysql::scheduler::Task_schedule.
|
inlineoverridevirtual |
Implements mysql::scheduler::Task_schedule.
|
overridevirtual |
This function modifies the state of the schedule to next state.
Implements mysql::scheduler::Task_schedule.
|
private |
Clock this schedule is based on.
|
private |
Delay since clock start point.
|
private |
This task id.