Caching component for PostgreSQL. See Caching Component for PostgreSQL. More...
#include <userver/cache/base_postgres_cache.hpp>
Public Types | |
using | PolicyType = PostgreCachePolicy |
using | ValueType = pg_cache::detail::ValueType< PolicyType > |
using | RawValueType = pg_cache::detail::RawValueType< PolicyType > |
using | DataType = pg_cache::detail::DataCacheContainerType< PolicyType > |
using | PolicyCheckerType = pg_cache::detail::PolicyChecker< PostgreCachePolicy > |
using | UpdatedFieldType = pg_cache::detail::UpdatedFieldType< PostgreCachePolicy > |
using | BaseType = typename PolicyCheckerType::BaseType |
Public Types inherited from components::CachingComponentBase< T > | |
using | DataType = T |
Public Member Functions | |
PostgreCache (const ComponentConfig &, const ComponentContext &) | |
Public Member Functions inherited from components::CachingComponentBase< T > | |
CachingComponentBase (const ComponentConfig &config, const ComponentContext &) | |
utils::SharedReadablePtr< T > | Get () const |
utils::SharedReadablePtr< T > | GetUnsafe () const |
template<class Class > | |
concurrent::AsyncEventSubscriberScope | UpdateAndListen (Class *obj, std::string name, void(Class::*func)(const std::shared_ptr< const T > &)) |
concurrent::AsyncEventChannel< const std::shared_ptr< const T > & > & | GetEventChannel () |
Public Member Functions inherited from components::LoggableComponentBase | |
LoggableComponentBase (const ComponentConfig &, const ComponentContext &) | |
LoggableComponentBase (LoggableComponentBase &&)=delete | |
LoggableComponentBase (const LoggableComponentBase &)=delete | |
~LoggableComponentBase () override=default | |
ComponentHealth | GetComponentHealth () const override |
void | OnLoadingCancelled () override |
void | OnAllComponentsLoaded () override |
void | OnAllComponentsAreStopping () override |
Static Public Member Functions | |
static yaml_config::Schema | GetStaticConfigSchema () |
Static Public Member Functions inherited from components::CachingComponentBase< T > | |
static yaml_config::Schema | GetStaticConfigSchema () |
Static Public Member Functions inherited from components::LoggableComponentBase | |
static yaml_config::Schema | GetStaticConfigSchema () |
Static Public Attributes | |
static constexpr bool | kIncrementalUpdates |
static constexpr auto | kClusterHostTypeFlags |
static constexpr auto | kName = PolicyType::kName |
Additional Inherited Members | |
Protected Types inherited from cache::CacheUpdateTrait | |
enum class | Flag { kNone = 0 , kNoFirstUpdate = 1 << 0 } |
Periodic update flags. More... | |
Protected Member Functions inherited from components::CachingComponentBase< T > | |
void | Set (std::unique_ptr< const T > value_ptr) |
void | Set (T &&value) |
template<typename... Args> | |
void | Emplace (Args &&... args) |
void | Clear () |
virtual void | WriteContents (dump::Writer &writer, const T &contents) const |
virtual std::unique_ptr< const T > | ReadContents (dump::Reader &reader) const |
Protected Member Functions inherited from cache::CacheUpdateTrait | |
AllowedUpdateTypes | GetAllowedUpdateTypes () const |
Update types configured for the cache. | |
void | StartPeriodicUpdates (utils::Flags< Flag > flags={}) |
Starts periodic updates. | |
void | StopPeriodicUpdates () |
Stops periodic updates. | |
void | AssertPeriodicUpdateStarted () |
void | OnCacheModified () |
CacheUpdateTrait (CacheUpdateTrait &&)=delete | |
CacheUpdateTrait & | operator= (CacheUpdateTrait &&)=delete |
void | InvalidateAsync (UpdateType update_type) |
Non-blocking forced cache update of specified type. | |
void | UpdateSyncDebug (UpdateType update_type) |
Forces a cache update of specified type. | |
const std::string & | Name () const |
Caching component for PostgreSQL. See Caching Component for PostgreSQL.
Definition at line 376 of file base_postgres_cache.hpp.
using components::PostgreCache< PostgreCachePolicy >::BaseType = typename PolicyCheckerType::BaseType |
Definition at line 387 of file base_postgres_cache.hpp.
using components::PostgreCache< PostgreCachePolicy >::DataType = pg_cache::detail::DataCacheContainerType<PolicyType> |
Definition at line 383 of file base_postgres_cache.hpp.
using components::PostgreCache< PostgreCachePolicy >::PolicyCheckerType = pg_cache::detail::PolicyChecker<PostgreCachePolicy> |
Definition at line 384 of file base_postgres_cache.hpp.
using components::PostgreCache< PostgreCachePolicy >::PolicyType = PostgreCachePolicy |
Definition at line 380 of file base_postgres_cache.hpp.
using components::PostgreCache< PostgreCachePolicy >::RawValueType = pg_cache::detail::RawValueType<PolicyType> |
Definition at line 382 of file base_postgres_cache.hpp.
using components::PostgreCache< PostgreCachePolicy >::UpdatedFieldType = pg_cache::detail::UpdatedFieldType<PostgreCachePolicy> |
Definition at line 385 of file base_postgres_cache.hpp.
using components::PostgreCache< PostgreCachePolicy >::ValueType = pg_cache::detail::ValueType<PolicyType> |
Definition at line 381 of file base_postgres_cache.hpp.
components::PostgreCache< PostgreCachePolicy >::PostgreCache | ( | const ComponentConfig & | config, |
const ComponentContext & | context | ||
) |
Definition at line 439 of file base_postgres_cache.hpp.
|
override |
Definition at line 486 of file base_postgres_cache.hpp.
|
static |
Definition at line 698 of file base_postgres_cache.hpp.
|
staticconstexpr |
Definition at line 392 of file base_postgres_cache.hpp.
|
staticconstexpr |
Definition at line 390 of file base_postgres_cache.hpp.
|
staticconstexpr |
Definition at line 394 of file base_postgres_cache.hpp.