zookeeper-cpp
ZooKeeper Client for C++
|
Represents a single operation of a multi_op. More...
#include <zk/multi.hpp>
Classes | |
struct | check_data |
Data for a op::check operation. More... | |
struct | create_data |
Data for a op::create operation. More... | |
struct | erase_data |
Data for a op::erase operation. More... | |
struct | set_data |
Data for a op::set operation. More... | |
Public Member Functions | |
op (const op &) | |
op (op &&) noexcept | |
op & | operator= (const op &)=delete |
op & | operator= (op &&)=delete |
op_type | type () const |
Get the underlying type of this operation. More... | |
const check_data & | as_check () const |
Get the check-specific data. More... | |
const create_data & | as_create () const |
Get the create-specific data. More... | |
const erase_data & | as_erase () const |
Get the erase-specific data. More... | |
const set_data & | as_set () const |
Get the set-specific data. More... | |
Static Public Member Functions | |
static op | check (std::string path, version check=version::any()) |
Check that the given path exists with the provided version check (which can be version::any ). More... | |
static op | erase (std::string path, version check=version::any()) |
Delete the entry at the given path if it matches the version check. More... | |
static op | set (std::string path, buffer data, version check=version::any()) |
Set the data for the entry at path if it matches the version check. More... | |
static op | create (std::string path, buffer data, acl rules, create_mode mode=create_mode::normal) |
static op | create (std::string path, buffer data, create_mode mode=create_mode::normal) |
Friends | |
std::ostream & | operator<< (std::ostream &, const op &) |
const op::check_data & zk::op::as_check | ( | ) | const |
Get the check-specific data.
std::logic_error | if the type is not op_type::check. |
const op::create_data & zk::op::as_create | ( | ) | const |
Get the create-specific data.
std::logic_error | if the type is not op_type::create. |
const op::erase_data & zk::op::as_erase | ( | ) | const |
Get the erase-specific data.
std::logic_error | if the type is not op_type::erase. |
const op::set_data & zk::op::as_set | ( | ) | const |
Get the set-specific data.
std::logic_error | if the type is not op_type::set. |
|
static |
Check that the given path exists with the provided version check (which can be version::any
).
|
static |
Create a new entry at the given path with the data.
|
static |
Delete the entry at the given path if it matches the version check.
|
static |
Set the data for the entry at path if it matches the version check.
op_type zk::op::type | ( | ) | const |