libfoedus-core
FOEDUS Core Library
|
Pimpl object of ProcManager. More...
Pimpl object of ProcManager.
A private pimpl object for ProcManager. Do not include this header from a client program unless you know what you are doing.
Definition at line 65 of file proc_manager_pimpl.hpp.
#include <proc_manager_pimpl.hpp>
Classes | |
struct | SharedData |
All shared data in this module. More... | |
Public Member Functions | |
ProcManagerPimpl ()=delete | |
ProcManagerPimpl (Engine *engine) | |
ErrorStack | initialize_once () override |
ErrorStack | uninitialize_once () override |
std::string | describe_registered_procs () const |
ErrorStack | get_proc (const ProcName &name, Proc *out) |
ErrorStack | pre_register (const ProcAndName &proc_and_name) |
ErrorStack | local_register (const ProcAndName &proc_and_name) |
ErrorStack | emulated_register (const ProcAndName &proc_and_name) |
SharedData * | get_local_data () |
const SharedData * | get_local_data () const |
![]() | |
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 () |
Static Public Member Functions | |
static LocalProcId | find_by_name (const ProcName &name, SharedData *shared_data) |
static LocalProcId | insert (const ProcAndName &proc_and_name, SharedData *shared_data) |
Public Attributes | |
Engine *const | engine_ |
std::vector< ProcAndName > | pre_registered_procs_ |
std::vector< SharedData > | all_soc_procs_ |
Shared data of all SOCs. More... | |
|
delete |
|
inlineexplicit |
Definition at line 78 of file proc_manager_pimpl.hpp.
std::string foedus::proc::ProcManagerPimpl::describe_registered_procs | ( | ) | const |
Definition at line 172 of file proc_manager_pimpl.cpp.
References foedus::proc::ProcManagerPimpl::SharedData::control_block_, foedus::proc::ProcManagerControlBlock::count_, engine_, get_local_data(), foedus::Engine::is_master(), and foedus::proc::ProcManagerPimpl::SharedData::procs_.
Referenced by foedus::proc::ProcManager::describe_registered_procs().
ErrorStack foedus::proc::ProcManagerPimpl::emulated_register | ( | const ProcAndName & | proc_and_name | ) |
Definition at line 129 of file proc_manager_pimpl.cpp.
References engine_, ERROR_STACK, foedus::get_error_message(), foedus::Engine::get_options(), foedus::DefaultInitializable::is_initialized(), foedus::kChildEmulated, foedus::kErrorCodeProcRegisterTooEarly, foedus::kErrorCodeProcRegisterUnsupportedSocType, foedus::kRetOk, foedus::EngineOptions::soc_, and foedus::soc::SocOptions::soc_type_.
Referenced by foedus::proc::ProcManager::emulated_register().
|
static |
Definition at line 146 of file proc_manager_pimpl.cpp.
References foedus::proc::ProcManagerPimpl::SharedData::control_block_, foedus::proc::ProcManagerControlBlock::count_, foedus::proc::kLocalProcInvalid, foedus::assorted::memory_fence_acquire(), and foedus::proc::ProcManagerPimpl::SharedData::procs_.
Referenced by get_proc(), and insert().
ProcManagerPimpl::SharedData * foedus::proc::ProcManagerPimpl::get_local_data | ( | ) |
Definition at line 80 of file proc_manager_pimpl.cpp.
References all_soc_procs_, ASSERT_ND, engine_, foedus::Engine::get_soc_id(), and foedus::Engine::is_master().
Referenced by describe_registered_procs(), initialize_once(), local_register(), and uninitialize_once().
const ProcManagerPimpl::SharedData * foedus::proc::ProcManagerPimpl::get_local_data | ( | ) | const |
Definition at line 84 of file proc_manager_pimpl.cpp.
References all_soc_procs_, ASSERT_ND, engine_, foedus::Engine::get_soc_id(), and foedus::Engine::is_master().
ErrorStack foedus::proc::ProcManagerPimpl::get_proc | ( | const ProcName & | name, |
Proc * | out | ||
) |
Definition at line 71 of file proc_manager_pimpl.cpp.
References all_soc_procs_, foedus::assorted::FixedString< MAXLEN, CHAR >::c_str(), engine_, ERROR_STACK_MSG, find_by_name(), foedus::Engine::get_soc_id(), foedus::kErrorCodeProcNotFound, foedus::proc::kLocalProcInvalid, and foedus::kRetOk.
Referenced by foedus::proc::ProcManager::get_proc().
|
overridevirtual |
Implements foedus::DefaultInitializable.
Definition at line 35 of file proc_manager_pimpl.cpp.
References all_soc_procs_, foedus::proc::ProcManagerPimpl::SharedData::control_block_, foedus::Engine::describe_short(), engine_, get_local_data(), foedus::soc::SharedMemoryRepo::get_node_memory_anchors(), foedus::Engine::get_options(), foedus::soc::SocManager::get_shared_memory_repo(), foedus::Engine::get_soc_manager(), foedus::thread::ThreadOptions::group_count_, foedus::proc::ProcManagerControlBlock::initialize(), foedus::Engine::is_master(), foedus::kRetOk, foedus::proc::ProcManagerPimpl::SharedData::name_sort_, foedus::soc::NodeMemoryAnchors::proc_manager_memory_, foedus::soc::NodeMemoryAnchors::proc_memory_, foedus::soc::NodeMemoryAnchors::proc_name_sort_memory_, foedus::proc::ProcManagerPimpl::SharedData::procs_, and foedus::EngineOptions::thread_.
|
static |
Definition at line 158 of file proc_manager_pimpl.cpp.
References foedus::proc::ProcManagerPimpl::SharedData::control_block_, foedus::proc::ProcManagerControlBlock::count_, find_by_name(), foedus::proc::kLocalProcInvalid, foedus::proc::ProcManagerControlBlock::lock_, and foedus::proc::ProcManagerPimpl::SharedData::procs_.
Referenced by local_register().
ErrorStack foedus::proc::ProcManagerPimpl::local_register | ( | const ProcAndName & | proc_and_name | ) |
Definition at line 109 of file proc_manager_pimpl.cpp.
References engine_, ERROR_STACK, foedus::get_error_message(), get_local_data(), insert(), foedus::DefaultInitializable::is_initialized(), foedus::Engine::is_master(), foedus::kErrorCodeProcProcAlreadyExists, foedus::kErrorCodeProcRegisterChildOnly, foedus::kErrorCodeProcRegisterTooEarly, foedus::proc::kLocalProcInvalid, and foedus::kRetOk.
Referenced by foedus::proc::ProcManager::local_register().
ErrorStack foedus::proc::ProcManagerPimpl::pre_register | ( | const ProcAndName & | proc_and_name | ) |
Definition at line 89 of file proc_manager_pimpl.cpp.
References engine_, ERROR_STACK, foedus::get_error_message(), foedus::Engine::get_options(), foedus::DefaultInitializable::is_initialized(), foedus::Engine::is_master(), foedus::kChildEmulated, foedus::kChildForked, foedus::kErrorCodeProcPreRegisterTooLate, foedus::kErrorCodeProcRegisterMasterOnly, foedus::kErrorCodeProcRegisterUnsupportedSocType, foedus::kRetOk, pre_registered_procs_, foedus::EngineOptions::soc_, and foedus::soc::SocOptions::soc_type_.
Referenced by foedus::proc::ProcManager::pre_register().
|
overridevirtual |
Implements foedus::DefaultInitializable.
Definition at line 58 of file proc_manager_pimpl.cpp.
References all_soc_procs_, foedus::proc::ProcManagerPimpl::SharedData::control_block_, foedus::Engine::describe_short(), engine_, get_local_data(), foedus::Engine::is_master(), foedus::kRetOk, SUMMARIZE_ERROR_BATCH, and foedus::proc::ProcManagerControlBlock::uninitialize().
std::vector< SharedData > foedus::proc::ProcManagerPimpl::all_soc_procs_ |
Shared data of all SOCs.
Index is SOC ID.
Definition at line 99 of file proc_manager_pimpl.hpp.
Referenced by get_local_data(), get_proc(), initialize_once(), and uninitialize_once().
Engine* const foedus::proc::ProcManagerPimpl::engine_ |
Definition at line 94 of file proc_manager_pimpl.hpp.
Referenced by describe_registered_procs(), emulated_register(), get_local_data(), get_proc(), initialize_once(), local_register(), pre_register(), and uninitialize_once().
std::vector< ProcAndName > foedus::proc::ProcManagerPimpl::pre_registered_procs_ |
Definition at line 95 of file proc_manager_pimpl.hpp.
Referenced by foedus::proc::ProcManager::get_pre_registered_procedures(), and pre_register().