File Scheduler.h
Defines
-
DEFAULT_THREAD_RESULT_TIMEOUT_MS
-
namespace faabric
-
namespace scheduler
-
class Scheduler
Public Functions
-
Scheduler()
-
~Scheduler()
-
void reset()
-
void resetThreadLocalCache()
-
void shutdown()
-
inline bool isShutdown()
-
void broadcastSnapshotDelete(const faabric::Message &msg, const std::string &snapshotKey)
-
int reapStaleExecutors()
-
long getFunctionExecutorCount(const faabric::Message &msg)
-
void setThreadResultLocally(uint32_t appId, uint32_t msgId, int32_t returnValue, faabric::transport::Message &message)
Caches a message along with the thread result, to allow the thread result to refer to data held in that message (i.e. snapshot diffs). The message will be destroyed once the thread result is consumed.
-
size_t getCachedMessageCount()
-
std::string getThisHost()
-
void addHostToGlobalSet()
-
void removeHostFromGlobalSet(const std::string &host)
-
void setThisHostResources(faabric::HostResources &res)
-
std::vector<faabric::Message> getRecordedMessages()
-
void clearRecordedMessages()
Private Functions
Private Members
-
std::string thisHost
-
faabric::util::SystemConfig &conf
-
std::shared_mutex mx
-
std::atomic<bool> _isShutdown = false
-
std::unordered_map<std::string, std::vector<std::shared_ptr<faabric::executor::Executor>>> executors
-
faabric::snapshot::SnapshotRegistry ®
-
faabric::planner::KeepAliveThread keepAliveThread
-
SchedulerReaperThread reaperThread
-
faabric::transport::PointToPointBroker &broker
-
Scheduler()
-
class SchedulerReaperThread : public faabric::util::PeriodicBackgroundThread
- #include <Scheduler.h>
Background thread that periodically checks to see if any executors have become stale (i.e. not handled any requests in a given timeout). If any are found, they are removed.
Public Functions
-
virtual void doWork() override
-
virtual void doWork() override
-
class Scheduler
-
namespace scheduler