CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
23 #include <boost/filesystem/path.hpp>
24 #include <unordered_map>
26 namespace catapult {
namespace utils {
class ConfigurationBag; } }
28 namespace catapult {
namespace sync {
123 std::unordered_map<std::string, TaskConfiguration>
Tasks;
Tasks configuration settings.
Definition: TasksConfiguration.h:90
void VerifyBagSizeLte(const ConfigurationBag &bag, size_t expectedSize)
Verifies that the number of properties in bag is no greater than expectedSize.
Definition: utils/ConfigurationUtils.cpp:38
UniformTaskConfiguration Uniform
Configuration when task type is uniform.
Definition: TasksConfiguration.h:109
Represents a time duration.
Definition: TimeSpan.h:30
ConfigurationBag ExtractSectionAsBag(const ConfigurationBag &bag, const char *section)
Extracts all section properties from bag into a new bag with a single section with a default (empty s...
Definition: utils/ConfigurationUtils.cpp:43
A simple bag of properties.
Definition: ConfigurationBag.h:57
static DeceleratingTaskConfiguration LoadFromBag(const utils::ConfigurationBag &bag)
Loads a task configuration from bag.
Definition: TasksConfiguration.cpp:54
uint32_t NumPhaseOneRounds
Number of rounds before deceleration starts.
Definition: TasksConfiguration.h:70
Task configuration that is a union of all supported task configurations.
Definition: TasksConfiguration.h:102
uint32_t NumTransitionRounds
Number of transition rounds from minimum to maximum delay.
Definition: TasksConfiguration.h:73
std::unordered_map< std::string, TaskConfiguration > Tasks
A map of task names to task configurations.
Definition: TasksConfiguration.h:123
std::unordered_set< std::string > sections() const
Gets the names of all sections in this bag.
Definition: ConfigurationBag.h:104
utils::TimeSpan MaxDelay
Maximum delay between task executions.
Definition: TasksConfiguration.h:67
#define LOAD_PROPERTY(NAME)
Definition: TasksConfiguration.cpp:28
static DeceleratingTaskConfiguration Uninitialized()
Creates an uninitialized task configuration.
Definition: TasksConfiguration.cpp:50
Decelerating task configuration settings.
Definition: TasksConfiguration.h:58
TaskType
Supported task types.
Definition: TasksConfiguration.h:93
static TasksConfiguration LoadFromBag(const utils::ConfigurationBag &bag)
Loads a tasks configuration from bag.
Definition: TasksConfiguration.cpp:75
static TasksConfiguration LoadFromPath(const boost::filesystem::path &resourcesPath)
Loads a tasks configuration from resourcesPath.
Definition: TasksConfiguration.cpp:95
utils::TimeSpan MinDelay
Minimum delay between task executions.
Definition: TasksConfiguration.h:64
DeceleratingTaskConfiguration Decelerating
Configuration when task type is decelerating.
Definition: TasksConfiguration.h:112
TasksConfiguration()=default
DeceleratingTaskConfiguration()=default
A task that is scheduled with constant intervals.
A task that is scheduled with increasing intervals.
Definition: AddressExtractionExtension.cpp:28
TasksConfiguration::TaskType TaskType
Type of task.
Definition: TasksConfiguration.h:105
TaskConfiguration()
Creates an empty task configuration.
Definition: TasksConfiguration.h:117
static TasksConfiguration Uninitialized()
Creates an uninitialized tasks configuration.
Definition: TasksConfiguration.cpp:71
utils::TimeSpan StartDelay
Delay until the first execution of the task.
Definition: TasksConfiguration.h:61