|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|
Cached value fallback strategy. More...
#include <error_boundary.h>


Public Member Functions | |
| cached_value_strategy (std::chrono::seconds ttl=std::chrono::seconds(60)) | |
| void | update_cache (const T &value) |
| common::Result< T > | get_fallback (const error_info &, degradation_level) override |
Public Member Functions inherited from kcenon::monitoring::fallback_strategy_interface< T > | |
| virtual | ~fallback_strategy_interface ()=default |
Private Attributes | |
| std::chrono::seconds | ttl_ |
| T | cached_value_ |
| std::chrono::steady_clock::time_point | cache_time_ |
| bool | has_value_ |
| std::mutex | mutex_ |
Cached value fallback strategy.
Definition at line 138 of file error_boundary.h.
|
inlineexplicit |
Definition at line 140 of file error_boundary.h.
|
inlineoverridevirtual |
Implements kcenon::monitoring::fallback_strategy_interface< T >.
Definition at line 150 of file error_boundary.h.
References kcenon::monitoring::cached_value_strategy< T >::cache_time_, kcenon::monitoring::cached_value_strategy< T >::cached_value_, kcenon::monitoring::cached_value_strategy< T >::has_value_, kcenon::monitoring::cached_value_strategy< T >::mutex_, kcenon::monitoring::operation_failed, and kcenon::monitoring::cached_value_strategy< T >::ttl_.
|
inline |
Definition at line 143 of file error_boundary.h.
References kcenon::monitoring::cached_value_strategy< T >::cache_time_, kcenon::monitoring::cached_value_strategy< T >::cached_value_, kcenon::monitoring::cached_value_strategy< T >::has_value_, and kcenon::monitoring::cached_value_strategy< T >::mutex_.
|
private |
Definition at line 168 of file error_boundary.h.
Referenced by kcenon::monitoring::cached_value_strategy< T >::get_fallback(), and kcenon::monitoring::cached_value_strategy< T >::update_cache().
|
private |
Definition at line 167 of file error_boundary.h.
Referenced by kcenon::monitoring::cached_value_strategy< T >::get_fallback(), and kcenon::monitoring::cached_value_strategy< T >::update_cache().
|
private |
Definition at line 169 of file error_boundary.h.
Referenced by kcenon::monitoring::cached_value_strategy< T >::get_fallback(), and kcenon::monitoring::cached_value_strategy< T >::update_cache().
|
mutableprivate |
Definition at line 170 of file error_boundary.h.
Referenced by kcenon::monitoring::cached_value_strategy< T >::get_fallback(), and kcenon::monitoring::cached_value_strategy< T >::update_cache().
|
private |
Definition at line 166 of file error_boundary.h.
Referenced by kcenon::monitoring::cached_value_strategy< T >::get_fallback().