lintel 0.2.0
Loading...
Searching...
No Matches
HistoryRepository.h
Go to the documentation of this file.
1#ifndef LINTEL_HISTORYREPOSITORY_H
2#define LINTEL_HISTORYREPOSITORY_H
3
7#include <chrono>
8
9namespace lintel {
14{
15private:
16 // injections
17 std::shared_ptr<DatabaseConnectionConfigurations> m_connectionConfigurations;
18 std::shared_ptr<DatabaseConnectionEntry> m_connectionEntry;
19
20public:
22 [[nodiscard]] std::vector<HistoryEntry> allOf() const;
23
28 [[nodiscard]] std::vector<HistoryEntry> allOf(const std::string &label) const;
29
35 [[nodiscard]] std::vector<HistoryEntry> allOf(const std::string &processName, const std::string &serviceName) const;
36
43 [[nodiscard]] std::vector<HistoryEntry>
44 allOf(const std::string &processName, const std::string &serviceName, const std::string &label) const;
45
50 [[nodiscard]] std::vector<HistoryEntry> allOfProcess(const std::string &processName) const;
51
56 [[nodiscard]] std::vector<HistoryEntry> allOfService(const std::string &serviceName) const;
57
62 void insertOf(const std::vector<HistoryEntry> &entries) const;
63
68 void cleanAllOlderThan(std::chrono::sys_time<std::chrono::microseconds> timestamp) const;
69
74 explicit HistoryRepository(const std::shared_ptr<DatabaseConnectionConfigurations> &databaseConnectionConfigurations);
75};
76
77}// namespace lintel
78#endif// LINTEL_HISTORYREPOSITORY_H
Definition HistoryRepository.h:14
std::vector< HistoryEntry > allOf(const std::string &label) const
std::vector< HistoryEntry > allOf(const std::string &processName, const std::string &serviceName, const std::string &label) const
std::vector< HistoryEntry > allOfProcess(const std::string &processName) const
void insertOf(const std::vector< HistoryEntry > &entries) const
void cleanAllOlderThan(std::chrono::sys_time< std::chrono::microseconds > timestamp) const
std::vector< HistoryEntry > allOfService(const std::string &serviceName) const
std::vector< HistoryEntry > allOf() const
std::vector< HistoryEntry > allOf(const std::string &processName, const std::string &serviceName) const
HistoryRepository(const std::shared_ptr< DatabaseConnectionConfigurations > &databaseConnectionConfigurations)
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9