|
CCF
|
#include <tx.h>
Inherits ccf::kv::ReadOnlyTx.
Inherited by ccf::kv::CommittableTx.
Public Member Functions | |
| template<class M > | |
| M::Handle * | rw (M &m) |
| template<class M > | |
| M::Handle * | rw (const std::string &map_name) |
| template<class M > | |
| M::WriteOnlyHandle * | wo (M &m) |
| template<class M > | |
| M::WriteOnlyHandle * | wo (const std::string &map_name) |
Public Member Functions inherited from ccf::kv::ReadOnlyTx | |
| template<class M > | |
| M::ReadOnlyHandle * | ro (M &m) |
| template<class M > | |
| M::ReadOnlyHandle * | ro (const std::string &map_name) |
| BaseTx (AbstractStore *store_) | |
| BaseTx (const BaseTx &that)=delete | |
Public Member Functions inherited from ccf::kv::BaseTx | |
| BaseTx (AbstractStore *store_) | |
| BaseTx (const BaseTx &that)=delete | |
| BaseTx & | operator= (BaseTx &&other)=default |
| virtual | ~BaseTx () |
| std::optional< ccf::crypto::Sha256Hash > | get_root_at_read_version () |
Additional Inherited Members | |
Protected Member Functions inherited from ccf::kv::BaseTx | |
| void | retain_change_set (const std::string &map_name, std::unique_ptr< untyped::ChangeSet > &&change_set, const std::shared_ptr< AbstractMap > &abstract_map) |
| void | retain_handle (const std::string &map_name, std::unique_ptr< AbstractHandle > &&handle) |
| MapChanges | get_map_and_change_set_by_name (const std::string &map_name, bool track_deletes_on_missing_keys) |
| std::list< AbstractHandle * > | get_possible_handles (const std::string &map_name) |
| void | compacted_version_conflict (const std::string &map_name) |
| template<class THandle > | |
| THandle * | get_handle_by_name (const std::string &map_name, bool track_deletes_on_missing_keys) |
Protected Attributes inherited from ccf::kv::BaseTx | |
| std::unique_ptr< PrivateImpl > | pimpl |
| OrderedChanges | all_changes |
| std::optional< ccf::crypto::Sha256Hash > | root_at_read_version = std::nullopt |
Used to create writeable handles for accessing a Map.
Acquiring a handle will create the map in the KV if it does not yet exist. Any writes made by the returned handles will be visible to all other handles created by this transaction. They will only be visible to other transactions after this transaction has completed and been applied. For type-safety, prefer restricted handles returned by ro or wo where possible, rather than the general rw.
|
inline |
Get a read-write handle by map name. Map type must be specified as explicit template parameter.
| map_name | Name of map |
|
inline |
Get a read-write handle from a map instance.
This handle can be used for both reads and writes.
| m | Map instance |
|
inline |
Get a write-only handle by map name. Map type must be specified as explicit template parameter.
| map_name | Name of map |
|
inline |
Get a write-only handle from a map instance.
| m | Map instance |