zookeeper-cpp
ZooKeeper Client for C++
|
Data delivered when a watched event triggers. More...
#include <zk/results.hpp>
Public Member Functions | |
event (event_type type, zk::state state) noexcept | |
const event_type & | type () const |
The type of event that occurred. More... | |
const zk::state & | state () const |
The state of the connection when the event occurred. More... | |
Data delivered when a watched event triggers.
path
parameter is not included. It is not helpful to include, since you already know the path you specified when you set the watch in the first place. Furthermore, it is unsafe, as the contents addressed by the pointer are only safe in the callback thread. While we could copy the path into an std::string
, this would require an allocation on every delivery, which is very intrusive. Definition at line 202 of file results.hpp.
|
inline |
The state of the connection when the event occurred.
Keep in mind that it might be different when the value is delivered.
Definition at line 212 of file results.hpp.
|
inline |
The type of event that occurred.
Definition at line 208 of file results.hpp.