CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
27 namespace catapult {
namespace thread {
68 uint32_t numPhaseOneRounds,
70 uint32_t numTransitionRounds);
supplier< thread::future< TaskResult > > TaskCallback
Task callback that is invoked by the scheduler.
Definition: Task.h:39
#define CATAPULT_THROW_INVALID_ARGUMENT_2(MESSAGE, PARAM1, PARAM2)
Macro used to throw a catapult invalid argument with two parameters.
Definition: exceptions.h:187
static constexpr TimeSpan FromMilliseconds(uint64_t milliseconds)
Creates a time span from the given number of milliseconds.
Definition: TimeSpan.h:59
supplier< utils::TimeSpan > DelayGenerator
Supplier that generates delays.
Definition: Task.h:42
Represents a time duration.
Definition: TimeSpan.h:30
DelayGenerator CreateUniformDelayGenerator(const utils::TimeSpan &delay)
Creates a uniform delay generator that always returns delay.
Definition: Task.cpp:26
std::function< T()> supplier
A (stateless) supplier function.
Definition: functions.h:39
Task CreateNamedTask(const std::string &name, const TaskCallback &callback)
Creates an unscheduled task with name and callback.
Definition: Task.cpp:52
std::string Name
Friendly name of the task (optional).
Definition: Task.h:56
TaskResult
Result of a task.
Definition: Task.h:30
DelayGenerator NextDelay
Generates the delay until the next execution of the task.
Definition: Task.h:50
TaskCallback Callback
Callback associated with the task.
Definition: Task.h:53
utils::TimeSpan StartDelay
Delay until the first execution of the task.
Definition: Task.h:47
DelayGenerator CreateIncreasingDelayGenerator(const utils::TimeSpan &minDelay, uint32_t numPhaseOneRounds, const utils::TimeSpan &maxDelay, uint32_t numTransitionRounds)
Definition: Task.cpp:30
Definition: AddressExtractionExtension.cpp:28
A task that can be dispatched to the scheduler.
Definition: Task.h:45