libfoedus-core
FOEDUS Core Library
|
Snapshot cache manager. More...
Snapshot cache manager.
A snapshot cache manager exists in each SOC engine, maintaining their SOC-local snapshot cache. Everything is SOC-local, so actually a master engine does nothing here.
Definition at line 37 of file cache_manager.hpp.
#include <cache_manager.hpp>
Public Member Functions | |
CacheManager ()=delete | |
CacheManager (Engine *engine) | |
~CacheManager () | |
ErrorStack | initialize_once () override |
ErrorStack | uninitialize_once () override |
const CacheOptions & | get_options () const |
std::string | describe () const |
kind of to_string(). More... | |
ErrorStack | stop_cleaner () |
Stops internal eviction thread even before uninitialize() of this object is called. More... | |
![]() | |
DefaultInitializable () | |
virtual | ~DefaultInitializable () |
DefaultInitializable (const DefaultInitializable &)=delete | |
DefaultInitializable & | operator= (const DefaultInitializable &)=delete |
ErrorStack | initialize () override final |
Typical implementation of Initializable::initialize() that provides initialize-once semantics. More... | |
ErrorStack | uninitialize () override final |
Typical implementation of Initializable::uninitialize() that provides uninitialize-once semantics. More... | |
bool | is_initialized () const override final |
Returns whether the object has been already initialized or not. More... | |
![]() | |
virtual | ~Initializable () |
|
delete |
|
explicit |
Definition at line 27 of file cache_manager.cpp.
foedus::cache::CacheManager::~CacheManager | ( | ) |
Definition at line 30 of file cache_manager.cpp.
std::string foedus::cache::CacheManager::describe | ( | ) | const |
kind of to_string().
this might be slow, so do not call too often
Definition at line 37 of file cache_manager.cpp.
References foedus::cache::CacheManagerPimpl::describe().
const CacheOptions& foedus::cache::CacheManager::get_options | ( | ) | const |
|
overridevirtual |
Implements foedus::DefaultInitializable.
Definition at line 35 of file cache_manager.cpp.
References foedus::cache::CacheManagerPimpl::initialize_once().
ErrorStack foedus::cache::CacheManager::stop_cleaner | ( | ) |
Stops internal eviction thread even before uninitialize() of this object is called.
It is also automatically called from uninitialize(). Currently, this is used to avoid the race condition between XctManager's uninitialize() and this object's uninitialize(). Here is why: The cache cleaner depends on XctManager because the eviction is based on epochs. However, XctManager will be uninitialized before cache manager. If XctManager gets uninitialized while cleaner is processing, we'll get a trouble. To avoid that, XctManager's uninitialize() invokes stop_cleaner() once it finishes all transaction threads, meaning there will be no more new entries.
Definition at line 38 of file cache_manager.cpp.
References foedus::cache::CacheManagerPimpl::stop_cleaner().
Referenced by foedus::xct::XctManagerPimpl::uninitialize_once().
|
overridevirtual |
Implements foedus::DefaultInitializable.
Definition at line 36 of file cache_manager.cpp.
References foedus::cache::CacheManagerPimpl::uninitialize_once().