CCF
Loading...
Searching...
No Matches
tx_pimpl.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the Apache 2.0 License.
3#pragma once
4
5#include "ccf/tx.h"
6
7namespace ccf::kv
8{
10 {
12
13 // NB: This exists only to maintain the old API, where this Tx stores
14 // MapHandles and returns raw pointers to them. It could be removed entirely
15 // with a near-identical API if we return `shared_ptr`s, and assuming that
16 // we don't actually care about returning exactly the same Handle instance
17 // if `rw` is called multiple times
18 using PossibleHandles = std::list<std::unique_ptr<AbstractHandle>>;
19 std::map<std::string, PossibleHandles> all_handles;
20
21 // Note: read_txid version is set to NoVersion for the first transaction in
22 // the service, before anything has been applied to the KV.
23 std::optional<TxID> read_txid = std::nullopt;
25
26 std::map<std::string, std::shared_ptr<AbstractMap>> created_maps;
27 };
28}
Definition kv_types.h:680
Definition app_interface.h:19
constexpr View VIEW_UNKNOWN
Definition tx_id.h:26
uint64_t View
Definition tx_id.h:23
Definition tx_pimpl.h:10
std::list< std::unique_ptr< AbstractHandle > > PossibleHandles
Definition tx_pimpl.h:18
std::optional< TxID > read_txid
Definition tx_pimpl.h:23
AbstractStore * store
Definition tx_pimpl.h:11
std::map< std::string, std::shared_ptr< AbstractMap > > created_maps
Definition tx_pimpl.h:26
ccf::View commit_view
Definition tx_pimpl.h:24
std::map< std::string, PossibleHandles > all_handles
Definition tx_pimpl.h:19