lintel 0.2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lintel::HistoryRepository Class Reference

#include <HistoryRepository.h>

Public Member Functions

std::vector< HistoryEntry > allOf () const
 
std::vector< HistoryEntry > allOf (const std::string &label) const
 
std::vector< HistoryEntry > allOf (const std::string &processName, const std::string &serviceName) 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
 
std::vector< HistoryEntry > allOfService (const std::string &serviceName) const
 
void insertOf (const std::vector< HistoryEntry > &entries) const
 
void cleanAllOlderThan (std::chrono::sys_time< std::chrono::microseconds > timestamp) const
 
 HistoryRepository (const std::shared_ptr< DatabaseConnectionConfigurations > &databaseConnectionConfigurations)
 

Detailed Description

Repository for persisting and querying HistoryEntry records in the database.

Constructor & Destructor Documentation

◆ HistoryRepository()

lintel::HistoryRepository::HistoryRepository ( const std::shared_ptr< DatabaseConnectionConfigurations > &  databaseConnectionConfigurations)
explicit

Constructor.

Parameters
databaseConnectionConfigurationsdatabase connection configuration

Member Function Documentation

◆ allOf() [1/4]

std::vector< HistoryEntry > lintel::HistoryRepository::allOf ( ) const
Returns
all history entries

◆ allOf() [2/4]

std::vector< HistoryEntry > lintel::HistoryRepository::allOf ( const std::string &  label) const
Parameters
labelfilter by label
Returns
history entries with the given label

◆ allOf() [3/4]

std::vector< HistoryEntry > lintel::HistoryRepository::allOf ( const std::string &  processName,
const std::string &  serviceName 
) const
Parameters
processNamefilter by process name
serviceNamefilter by service name
Returns
history entries matching process and service

◆ allOf() [4/4]

std::vector< HistoryEntry > lintel::HistoryRepository::allOf ( const std::string &  processName,
const std::string &  serviceName,
const std::string &  label 
) const
Parameters
processNamefilter by process name
serviceNamefilter by service name
labelfilter by label
Returns
history entries matching all filters

◆ allOfProcess()

std::vector< HistoryEntry > lintel::HistoryRepository::allOfProcess ( const std::string &  processName) const
Parameters
processNamefilter by process name
Returns
history entries for the given process

◆ allOfService()

std::vector< HistoryEntry > lintel::HistoryRepository::allOfService ( const std::string &  serviceName) const
Parameters
serviceNamefilter by service name
Returns
history entries for the given service

◆ cleanAllOlderThan()

void lintel::HistoryRepository::cleanAllOlderThan ( std::chrono::sys_time< std::chrono::microseconds >  timestamp) const

Delete all entries older than the given timestamp.

Parameters
timestampcutoff timestamp

◆ insertOf()

void lintel::HistoryRepository::insertOf ( const std::vector< HistoryEntry > &  entries) const

Insert multiple history entries.

Parameters
entriesentries to insert

The documentation for this class was generated from the following file: