identt
StoreTrans.hpp
Go to the documentation of this file.
1 
33 #ifndef _IDENTT_STORE_STORE_TRANS_HPP_
34 #define _IDENTT_STORE_STORE_TRANS_HPP_
35 
36 #include <utils/SharedTable.hpp>
37 #include <store/StoreLevel.hpp>
38 
39 namespace identt {
40 namespace store {
41 class StoreTrans : public StoreBase {
42 public:
43  using dbpointer = StoreLevel::dbpointer;
44 
49  StoreTrans() = default;
50 
55  StoreTrans(const StoreTrans&) = delete;
56  StoreTrans& operator=(const StoreTrans&) = delete;
57 
73  void Commit(::identt::utils::SharedTable::pointer stptr, TransactionT* trans, bool is_master);
74 
90  bool CommitLog(::identt::utils::SharedTable::pointer stptr, TransactionT* trans, bool is_master);
91 
104  bool CommitData(::identt::utils::SharedTable::pointer stptr, TransactionT* trans);
105 
118  void ReadLog(::identt::utils::SharedTable::pointer stptr, TransListT* tlist);
119 
132  void ReadOne(::identt::utils::SharedTable::pointer stptr, TransactionT* trans);
133 
134 private:
135 
136 };
137 } // namespace store
138 } // namespace identt
139 #endif /* _IDENTT_STORE_STORE_TRANS_HPP_ */
Definition: StoreBase.hpp:58
void ReadOne(::identt::utils::SharedTable::pointer stptr, TransactionT *trans)
ReadOne : read a single transaction.
Definition: StoreTrans.cc:144
Definition: CryptoBase.hpp:49
void ReadLog(::identt::utils::SharedTable::pointer stptr, TransListT *tlist)
ReadLog : read from log in sequence.
StoreTrans()=default
Constructor.
bool CommitLog(::identt::utils::SharedTable::pointer stptr, TransactionT *trans, bool is_master)
CommitLog : write log ensure id is sequentially generated.
Definition: StoreTrans.hpp:41
bool CommitData(::identt::utils::SharedTable::pointer stptr, TransactionT *trans)
CommitData : write data.
void Commit(::identt::utils::SharedTable::pointer stptr, TransactionT *trans, bool is_master)
Commit : write both transaction and log.