MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / SchedulingAgent

Method SchedulingAgent

libminifi/include/SchedulingAgent.h:62–81  ·  view source on GitHub ↗

Constructor ! * Create a new scheduling agent. */

Source from the content-addressed store, hash-verified

60 * Create a new scheduling agent.
61 */
62 SchedulingAgent(const gsl::not_null<core::controller::ControllerServiceProvider*> controller_service_provider, std::shared_ptr<core::Repository> repo, std::shared_ptr<core::Repository> flow_repo,
63 std::shared_ptr<core::ContentRepository> content_repo, std::shared_ptr<Configure> configuration, utils::ThreadPool<utils::TaskRescheduleInfo> &thread_pool)
64 : admin_yield_duration_(),
65 bored_yield_duration_(0),
66 configure_(configuration),
67 content_repo_(content_repo),
68 thread_pool_(thread_pool),
69 controller_service_provider_(controller_service_provider),
70 logger_(logging::LoggerFactory<SchedulingAgent>::getLogger()),
71 alert_time_(configuration->getInt(Configure::nifi_flow_engine_alert_period, SCHEDULING_WATCHDOG_DEFAULT_ALERT_PERIOD_MS)) {
72 running_ = false;
73 repo_ = repo;
74 flow_repo_ = flow_repo;
75
76 if (alert_time_ > std::chrono::milliseconds(0)) {
77 std::function<void(void)> f = std::bind(&SchedulingAgent::watchDogFunc, this);
78 watchDogTimer_.reset(new utils::CallBackTimer(std::chrono::milliseconds(SCHEDULING_WATCHDOG_CHECK_PERIOD_MS), f));
79 watchDogTimer_->start();
80 }
81 }
82
83 virtual ~SchedulingAgent() {
84 // Do NOT remove this!

Callers

nothing calls this directly

Calls 3

getIntMethod · 0.80
resetMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected