A collection of operations that will be performed atomically.
More...
#include <zk/multi.hpp>
|
using | iterator = std::vector< op >::iterator |
|
using | const_iterator = std::vector< op >::const_iterator |
|
using | size_type = std::vector< op >::size_type |
|
|
| multi_op () noexcept |
| Create an empty operation set. More...
|
|
| multi_op (std::vector< op > ops) noexcept |
| Create an instance from the provided ops. More...
|
|
| multi_op (std::initializer_list< op > ops) |
| Create an instance from the provided ops. More...
|
|
size_type | size () const |
| The number of operations in this transaction bundle. More...
|
|
void | reserve (size_type capacity) |
| Increase the reserved memory block so it can store at least capacity operations without reallocating. More...
|
|
template<typename... TArgs> |
void | emplace_back (TArgs &&...args) |
| Construct an operation emplace on the end of the list using args. More...
|
|
|
const op & | operator[] (size_type idx) const |
|
op & | operator[] (size_type idx) |
|
|
const op & | at (size_type idx) const |
|
op & | at (size_type idx) |
|
|
iterator | begin () |
|
const_iterator | begin () const |
|
const_iterator | cbegin () const |
|
|
iterator | end () |
|
const_iterator | end () const |
|
const_iterator | cend () const |
|
|
void | push_back (op &&x) |
|
void | push_back (const op &x) |
|
A collection of operations that will be performed atomically.
- See also
- client::commit
-
op
Definition at line 162 of file multi.hpp.
zk::multi_op::multi_op |
( |
| ) |
|
|
inlinenoexcept |
Create an empty operation set.
Definition at line 171 of file multi.hpp.
zk::multi_op::multi_op |
( |
std::vector< op > |
ops | ) |
|
|
noexcept |
Create an instance from the provided ops.
Definition at line 203 of file multi.cpp.
zk::multi_op::multi_op |
( |
std::initializer_list< op > |
ops | ) |
|
|
inline |
Create an instance from the provided ops.
Definition at line 178 of file multi.hpp.
const op& zk::multi_op::at |
( |
size_type |
idx | ) |
const |
|
inline |
Get the operation at the given idx.
- Exceptions
-
std::out_of_range | if idx is larger than size. |
Definition at line 197 of file multi.hpp.
iterator zk::multi_op::begin |
( |
| ) |
|
|
inline |
Get an iterator to the beginning of the operation list.
Definition at line 203 of file multi.hpp.
template<typename... TArgs>
void zk::multi_op::emplace_back |
( |
TArgs &&... |
args | ) |
|
|
inline |
Construct an operation emplace on the end of the list using args.
- See also
- push_back
Definition at line 222 of file multi.hpp.
iterator zk::multi_op::end |
( |
| ) |
|
|
inline |
Get an iterator to the end of the operation list.
Definition at line 210 of file multi.hpp.
const op& zk::multi_op::operator[] |
( |
size_type |
idx | ) |
const |
|
inline |
Get the operation at the given idx.
Definition at line 189 of file multi.hpp.
void zk::multi_op::push_back |
( |
op && |
x | ) |
|
|
inline |
Add the operation x to the end of this list.
Definition at line 229 of file multi.hpp.
void zk::multi_op::reserve |
( |
size_type |
capacity | ) |
|
|
inline |
Increase the reserved memory block so it can store at least capacity operations without reallocating.
Definition at line 216 of file multi.hpp.
size_type zk::multi_op::size |
( |
| ) |
const |
|
inline |
The number of operations in this transaction bundle.
Definition at line 185 of file multi.hpp.
The documentation for this class was generated from the following files: