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

#include <HistoryService.h>

Inheritance diagram for lintel::HistoryService:
lintel::PropertyRegistration< HistoryService > lintel::IHistoryService lintel::AbstractService< T > lintel::AbstractServiceInterface

Public Member Functions

 HistoryService (std::shared_ptr< ProcessName > processName, std::shared_ptr< SchedulerService > schedulerService, std::shared_ptr< HistoryRepository > historyRepository, std::shared_ptr< MessageQueueService > messageQueueService)
 
 ~HistoryService () override
 
void onInitialize () override
 
void onShutdown () override
 
void historizeOf (std::vector< HistoryEntry > entries) override
 
const std::string & getProcessName () const override
 
std::vector< HistoryEntry > allOf () const override
 
std::vector< HistoryEntry > allOf (const std::string &label) const override
 
std::vector< HistoryEntry > allOf (const std::string &processName, const std::string &serviceName) const override
 
std::vector< HistoryEntry > allOfProcess (const std::string &processName) const override
 
std::vector< HistoryEntry > allOfService (const std::string &serviceName) const override
 
- Public Member Functions inherited from lintel::AbstractService< T >
 AbstractService ()=delete
 
 AbstractService (std::string processName, std::string instanceName)
 
 AbstractService (std::string processName)
 
ShutdownPriority shutdownPriorityOf () const override
 
const std::string & getInstanceName () const override
 
std::string_view getClassName () const override
 
- Public Member Functions inherited from lintel::AbstractServiceInterface
virtual ~AbstractServiceInterface ()=default
 
- Public Member Functions inherited from lintel::IHistoryService
virtual ~IHistoryService ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from lintel::PropertyRegistration< HistoryService >
std::shared_ptr< Property< type > > registerProperty (std::string name, type defaultValue, std::string description, bool runtime, const std::string &fileName, int32_t position)
 
- Protected Attributes inherited from lintel::AbstractService< T >
std::vector< std::shared_ptr< PropertyBase > > m_properties
 

Detailed Description

Service for recording, queuing, and querying history entries. Uses a message queue for inter-process history submission.

Constructor & Destructor Documentation

◆ HistoryService()

lintel::HistoryService::HistoryService ( std::shared_ptr< ProcessName >  processName,
std::shared_ptr< SchedulerService >  schedulerService,
std::shared_ptr< HistoryRepository >  historyRepository,
std::shared_ptr< MessageQueueService >  messageQueueService 
)

Constructor.

Parameters
processNamecurrent process name
schedulerServicescheduler for periodic commits
historyRepositorypersistence repository
messageQueueServicemessage queue for inter-process communication

◆ ~HistoryService()

lintel::HistoryService::~HistoryService ( )
override

Member Function Documentation

◆ allOf() [1/3]

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

Implements lintel::IHistoryService.

◆ allOf() [2/3]

std::vector< HistoryEntry > lintel::HistoryService::allOf ( const std::string &  label) const
overridevirtual
Parameters
labelfilter by label
Returns
matching entries

Implements lintel::IHistoryService.

◆ allOf() [3/3]

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

Implements lintel::IHistoryService.

◆ allOfProcess()

std::vector< HistoryEntry > lintel::HistoryService::allOfProcess ( const std::string &  processName) const
overridevirtual
Parameters
processNamefilter by process name
Returns
matching entries

Implements lintel::IHistoryService.

◆ allOfService()

std::vector< HistoryEntry > lintel::HistoryService::allOfService ( const std::string &  serviceName) const
overridevirtual
Parameters
serviceNamefilter by service name
Returns
matching entries

Implements lintel::IHistoryService.

◆ getProcessName()

const std::string & lintel::HistoryService::getProcessName ( ) const
overridevirtual
Returns
the process name of the owning process

Reimplemented from lintel::AbstractService< T >.

◆ historizeOf()

void lintel::HistoryService::historizeOf ( std::vector< HistoryEntry >  entries)
overridevirtual

Record history entries (may be queued for batch insert).

Parameters
entriesentries to record

Implements lintel::IHistoryService.

◆ onInitialize()

void lintel::HistoryService::onInitialize ( )
overridevirtual

Default initialization does nothing; override in subclasses.

Reimplemented from lintel::AbstractService< T >.

◆ onShutdown()

void lintel::HistoryService::onShutdown ( )
overridevirtual

Default shutdown does nothing; override in subclasses.

Reimplemented from lintel::AbstractService< T >.


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