Kea 2.7.5
|
Embodies a named set of CriticalSection callbacks. More...
#include <multi_threading_mgr.h>
Public Types | |
typedef std::function< void()> | Callback |
Defines a callback as a simple void() functor. | |
Public Member Functions | |
CSCallbackSet (const std::string &name, const Callback &check_cb, const Callback &entry_cb, const Callback &exit_cb) | |
Constructor. | |
Public Attributes | |
Callback | check_cb_ |
Check permissions callback associated with name. | |
Callback | entry_cb_ |
Entry point callback associated with name. | |
Callback | exit_cb_ |
Exit point callback associated with name. | |
std::string | name_ |
Name by which the callback can be found. | |
Embodies a named set of CriticalSection callbacks.
This class associates with a name, a set of callbacks, one to be invoked before CriticalSection entry and exit callbacks to check current thread permissions to perform such actions, one to be invoked upon CriticalSection entry and one to be invoked upon CriticalSection exit. The name allows the set to be uniquely identified such that they can be added and removed as needed. The check current thread permissions callback needs to throw MultiThreadingInvalidOperation if the thread is not allowed to perform CriticalSection entry and exit. Any other exception thrown by the check permission callbacks will be silently ignored. The CriticalSection entry and exit callbacks exceptions will be silently ignored.
Definition at line 36 of file multi_threading_mgr.h.
typedef std::function<void()> isc::util::CSCallbackSet::Callback |
Defines a callback as a simple void() functor.
Definition at line 38 of file multi_threading_mgr.h.
|
inline |
Constructor.
name | Name by which the callbacks can be found. |
check_cb | Callback to check current thread permissions to call the CriticalSection entry and exit callbacks. |
entry_cb | Callback to invoke upon CriticalSection entry. |
exit_cb | Callback to invoke upon CriticalSection exit. |
Definition at line 47 of file multi_threading_mgr.h.
Callback isc::util::CSCallbackSet::check_cb_ |
Check permissions callback associated with name.
Definition at line 56 of file multi_threading_mgr.h.
Callback isc::util::CSCallbackSet::entry_cb_ |
Entry point callback associated with name.
Definition at line 59 of file multi_threading_mgr.h.
Callback isc::util::CSCallbackSet::exit_cb_ |
Exit point callback associated with name.
Definition at line 62 of file multi_threading_mgr.h.
std::string isc::util::CSCallbackSet::name_ |
Name by which the callback can be found.
Definition at line 53 of file multi_threading_mgr.h.