#include <set_handle.h>
Inherited by ccf::kv::SetHandle< K, KSerialiser, Unit >.
template<typename K, typename KSerialiser>
class ccf::kv::ReadableSetHandle< K, KSerialiser >
Grants read access to a ccf::kv::Set
, as part of a ccf::kv::Tx
.
◆ KeyType
template<typename K , typename KSerialiser >
◆ ReadableSetHandle()
template<typename K , typename KSerialiser >
◆ contains()
template<typename K , typename KSerialiser >
Test whether a key is present in the set.
This returns true if the key is present, including if it was added to the set during this transaction.
- Parameters
-
- Returns
- Boolean true iff key exists
◆ contains_globally_committed()
template<typename K , typename KSerialiser >
Test whether a key's presence is globally committed, meaning it has been replciated and acknowledged by consensus protocol.
- See also
- ccf::kv::ReadableMapHandle::get_globally_committed
- Parameters
-
- Returns
- Boolean true iff key exists in globally committed state
◆ foreach()
template<typename K , typename KSerialiser >
template<class F >
Iterate over all entries in this set.
- See also
- ccf::kv::ReadableMapHandle::foreach
- Template Parameters
-
F | Functor type. Should usually be derived implicitly from f |
- Parameters
-
f | Functor instance, taking (const K& k) and returning a bool. Return value determines whether the iteration should continue (true) or stop (false) |
◆ get_version_of_previous_write()
template<typename K , typename KSerialiser >
Get version when this key was last added to the set.
Returns nullopt if the key is not present.
- See also
- ccf::kv::ReadableMapHandle::get_version_of_previous_write
- Parameters
-
- Returns
- Optional containing version of applied transaction which last wrote at this key, or nullopt if such a version does not exist
◆ size()
template<typename K , typename KSerialiser >
Returns number of entries in this set.
This is the count of all currently present keys, including both those which were already committed and any modifications (taking into account new additions or removals) that have been made during this transaction.
- Returns
- Count of entries
◆ read_handle
template<typename K , typename KSerialiser >
The documentation for this class was generated from the following file: