24#ifndef MYSQL_SCHEDULER_SCHEDULER_CLOCK_H
25#define MYSQL_SCHEDULER_SCHEDULER_CLOCK_H
Interface for clock implementations scheduler uses to schedule tasks.
Definition: scheduler_clock.h:52
virtual bool tick(Task_id task_id, Time_point_t time)=0
Notify that task finished execution.
uint64_t Time_point_t
Definition: scheduler_clock.h:54
virtual Scheduler_dependency_type get_type() const
Typical scheduler clock dependency type is end to start.
Definition: scheduler_clock.h:90
virtual Time_point_t now() const =0
Gets current time delay, i.e.
virtual Time_point_t start_time() const =0
Gets clock starting point, i.e.
virtual bool add_time(Task_id task_id, Time_point_t time)=0
Subscribes a task to time processing window, delay since beginning of a schedule.
virtual bool advances_independently() const
Returns property of a clock - information on whether this clock is steered by task ticks or advances ...
Definition: scheduler_clock.h:84
virtual ~Scheduler_clock()=default
Destructor.
virtual bool try_unblock()
Maintenance function for unblocking the clock.
Definition: scheduler_clock.h:87
Represents the identifier of a task ingested by the scheduler,.
Definition: task_id.h:41
Definition: base_dependency_tracker.h:41
Scheduler_dependency_type
Definition: scheduler_clock.h:38
constexpr std::size_t clock_unblock_delta
When unblocking, we tweak clock by this count.
Definition: scheduler_clock.h:41
std::shared_ptr< Scheduler_clock > Scheduler_clock_ptr
Definition: scheduler_clock.h:36