LogDevice API
|
#include <ConfigSubscriptionHandle.h>
Public Member Functions | |
ConfigSubscriptionHandle () noexcept=default | |
ConfigSubscriptionHandle (configuration::UpdateableConfigBase *owner, configuration::subscription_id_t sub_id) noexcept | |
~ConfigSubscriptionHandle () noexcept | |
ConfigSubscriptionHandle (ConfigSubscriptionHandle &&other) noexcept | |
ConfigSubscriptionHandle & | operator= (ConfigSubscriptionHandle &&other) noexcept |
void | unsubscribe () noexcept |
void | swap (ConfigSubscriptionHandle &other) noexcept |
An interface for the handle for client-side subscriptions to config updates. Contains no usable methods. Automatically unsubscribes itself on destruction (RAII).
Can be moved but not copied.
|
defaultnoexcept |
Default constructor. Creates a subscription handle without owner. Useful for move-assignment at a later point.
|
noexcept |
Constructor for a valid subscription handle.
owner | Configuration from where to unsubscribe at destruction. |
sub_id | The internal subscription ID generated from UpdateableConfig |
|
noexcept |
Destructor. Unsubscribes from owner, if any. If callback is running now, blocks until the callback returns.
|
noexcept |
Move constructor. Releases other.
|
noexcept |
Move-assignment operator. Unsubscribes this and releases other.
|
inlinenoexcept |
Swap two subscription handles.
|
noexcept |
Unsubscribe now. Useful if one wants to unsubscribe before or without destroying the handle.