Interface for process lifecycle dispatch orchestration.
More...
#include <i_dispatcher.h>
|
| virtual | ~IDispatcher ()=default |
| virtual Result< void > | createProcess (std::unique_ptr< ProcessImage > process, Tick currentTick)=0 |
| | Admits a new process into the system.
|
| virtual Result< void > | dispatch (std::size_t tickBudget)=0 |
| | Runs one scheduling/execution dispatch cycle.
|
| virtual Result< void > | terminateProcess (ProcessId pid, Tick currentTick)=0 |
| | Terminates a managed process immediately.
|
| virtual void | tick ()=0 |
| | Advances dispatcher-owned simulation time by one tick.
|
| virtual std::size_t | processCount () const noexcept=0 |
| | Returns number of processes tracked by dispatcher.
|
| virtual bool | hasProcess (ProcessId pid) const noexcept=0 |
| | Returns whether process exists.
|
Interface for process lifecycle dispatch orchestration.
Definition at line 17 of file i_dispatcher.h.
◆ ~IDispatcher()
| virtual contur::IDispatcher::~IDispatcher |
( |
| ) |
|
|
virtualdefault |
◆ createProcess()
| virtual Result< void > contur::IDispatcher::createProcess |
( |
std::unique_ptr< ProcessImage > | process, |
|
|
Tick | currentTick ) |
|
nodiscardpure virtual |
Admits a new process into the system.
- Parameters
-
| process | Owned process image. |
| currentTick | Current simulation tick. |
- Returns
- Ok on success or an error code.
Implemented in contur::Dispatcher, and contur::MPDispatcher.
◆ dispatch()
| virtual Result< void > contur::IDispatcher::dispatch |
( |
std::size_t | tickBudget | ) |
|
|
nodiscardpure virtual |
Runs one scheduling/execution dispatch cycle.
- Parameters
-
| tickBudget | Time budget for selected process. |
- Returns
- Ok on success or an error code.
Implemented in contur::Dispatcher, and contur::MPDispatcher.
◆ hasProcess()
| virtual bool contur::IDispatcher::hasProcess |
( |
ProcessId | pid | ) |
const |
|
nodiscardpure virtualnoexcept |
◆ processCount()
| virtual std::size_t contur::IDispatcher::processCount |
( |
| ) |
const |
|
nodiscardpure virtualnoexcept |
◆ terminateProcess()
| virtual Result< void > contur::IDispatcher::terminateProcess |
( |
ProcessId | pid, |
|
|
Tick | currentTick ) |
|
nodiscardpure virtual |
Terminates a managed process immediately.
- Parameters
-
| pid | Process identifier. |
| currentTick | Current simulation tick. |
- Returns
- Ok on success or NotFound when process is unknown.
Implemented in contur::Dispatcher, and contur::MPDispatcher.
◆ tick()
| virtual void contur::IDispatcher::tick |
( |
| ) |
|
|
pure virtual |
The documentation for this class was generated from the following file: