Leosac  0.8.0
Open Source Access Control
Leosac::Tasks::GetLocalConfigVersion Class Reference

Run in the main thread and retrieve the current configuration version. More...

#include <GetLocalConfigVersion.hpp>

+ Inheritance diagram for Leosac::Tasks::GetLocalConfigVersion:
+ Collaboration diagram for Leosac::Tasks::GetLocalConfigVersion:

Public Member Functions

 GetLocalConfigVersion (Kernel &k)
 
- Public Member Functions inherited from Leosac::Tasks::Task
 Task ()
 
virtual ~Task ()
 
 Task (const Task &)=delete
 
 Task (Task &&)=delete
 
Taskoperator= (const Task &)=delete
 
Taskoperator= (Task &&)=delete
 
bool is_complete () const
 Has the tasks completed its execution. More...
 
void wait ()
 Instead of spinlocking over is_complete() one can call wait() to hum... More...
 
void run ()
 
bool succeed () const
 
std::exception_ptr get_exception () const
 
template<typename Callback >
void set_on_completion (Callback c)
 Set a callback that will be invoked when the tasks is completed, no matter if it succeeded or not. More...
 
template<typename Callback >
void set_on_success (Callback c)
 Set a callback that will be invoked if and when the task succeed. More...
 
template<typename Callback >
void set_on_failure (Callback c)
 Set a callback that will be invoked if and when the task fails. More...
 
const std::string & get_guid () const
 

Public Attributes

uint64_t config_version_
 

Private Member Functions

virtual bool do_run () override
 

Private Attributes

Kernelkernel_
 

Detailed Description

Run in the main thread and retrieve the current configuration version.

This is done by querying the kernel's configuration manager.

Definition at line 34 of file GetLocalConfigVersion.hpp.

Constructor & Destructor Documentation

◆ GetLocalConfigVersion()

Leosac::Tasks::GetLocalConfigVersion::GetLocalConfigVersion ( Kernel k)

Definition at line 25 of file GetLocalConfigVersion.cpp.

Member Function Documentation

◆ do_run()

bool Leosac::Tasks::GetLocalConfigVersion::do_run ( )
overrideprivatevirtual

Implements Leosac::Tasks::Task.

Definition at line 31 of file GetLocalConfigVersion.cpp.

Member Data Documentation

◆ config_version_

uint64_t Leosac::Tasks::GetLocalConfigVersion::config_version_

Definition at line 38 of file GetLocalConfigVersion.hpp.

◆ kernel_

Kernel& Leosac::Tasks::GetLocalConfigVersion::kernel_
private

Definition at line 43 of file GetLocalConfigVersion.hpp.


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