Class faabric::scheduler::Scheduler

class Scheduler

Public Functions

Scheduler()
~Scheduler()
void executeBatch(std::shared_ptr<faabric::BatchExecuteRequest> req)
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.

std::vector<std::pair<uint32_t, int32_t>> awaitThreadResults(std::shared_ptr<faabric::BatchExecuteRequest> req, int timeoutMs = DEFAULT_THREAD_RESULT_TIMEOUT_MS)
size_t getCachedMessageCount()
std::string getThisHost()
void addHostToGlobalSet()
void addHostToGlobalSet(const std::string &host, std::shared_ptr<faabric::HostResources> overwriteResources = nullptr)
void removeHostFromGlobalSet(const std::string &host)
void setThisHostResources(faabric::HostResources &res)
std::vector<faabric::Message> getRecordedMessages()
void clearRecordedMessages()
std::shared_ptr<faabric::PendingMigration> checkForMigrationOpportunities(faabric::Message &msg, int overwriteNewGroupId = 0)