CCF
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ccf::kv::ReadOnlyTx Class Reference

#include <tx.h>

Inherits ccf::kv::BaseTx.

Inherited by ccf::kv::Tx.

Public Member Functions

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
 
BaseTxoperator= (BaseTx &&other)=default
 
virtual ~BaseTx ()
 
std::optional< ccf::crypto::Sha256Hashget_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< PrivateImplpimpl
 
OrderedChanges all_changes
 
std::optional< ccf::crypto::Sha256Hashroot_at_read_version = std::nullopt
 

Detailed Description

Used to create read-only handles for accessing a Map.

Acquiring a handle will create the map in the KV if it does not yet exist. The returned handles can view state written by previous transactions, and any additional modifications made in this transaction.

Member Function Documentation

◆ BaseTx() [1/2]

ccf::kv::BaseTx::BaseTx ( AbstractStore store_)

◆ BaseTx() [2/2]

ccf::kv::BaseTx::BaseTx ( const BaseTx that)
delete

◆ ro() [1/2]

template<class M >
M::ReadOnlyHandle * ccf::kv::ReadOnlyTx::ro ( const std::string &  map_name)
inline

Get a read-only handle by map name. Map type must be specified as explicit template parameter.

Parameters
map_nameName of map

◆ ro() [2/2]

template<class M >
M::ReadOnlyHandle * ccf::kv::ReadOnlyTx::ro ( M &  m)
inline

Get a read-only handle from a map instance.

Parameters
mMap instance

The documentation for this class was generated from the following file: