File SnapshotRegistry.h

namespace faabric
namespace snapshot
class SnapshotRegistry

Public Functions

SnapshotRegistry() = default
std::shared_ptr<faabric::util::SnapshotData> getSnapshot(const std::string &key)
bool snapshotExists(const std::string &key)
void registerSnapshot(const std::string &key, std::shared_ptr<faabric::util::SnapshotData> data)
void deleteSnapshot(const std::string &key)
size_t getSnapshotCount()
void clear()

Private Functions

int writeSnapshotToFd(const std::string &key, faabric::util::SnapshotData &data)

Private Members

std::unordered_map<std::string, std::shared_ptr<faabric::util::SnapshotData>> snapshotMap
std::shared_mutex snapshotsMx