identt
Public Types | Public Member Functions | List of all members
identt::store::StoreTrans Class Reference
Inheritance diagram for identt::store::StoreTrans:
identt::store::StoreBase

Public Types

using dbpointer = StoreLevel::dbpointer
 

Public Member Functions

 StoreTrans ()=default
 Constructor. More...
 
 StoreTrans (const StoreTrans &)=delete
 make noncopyable and remove default
 
StoreTransoperator= (const StoreTrans &)=delete
 
void Commit (::identt::utils::SharedTable::pointer stptr, TransactionT *trans, bool is_master)
 Commit : write both transaction and log. More...
 
bool CommitLog (::identt::utils::SharedTable::pointer stptr, TransactionT *trans, bool is_master)
 CommitLog : write log ensure id is sequentially generated. More...
 
bool CommitData (::identt::utils::SharedTable::pointer stptr, TransactionT *trans)
 CommitData : write data. More...
 
void ReadLog (::identt::utils::SharedTable::pointer stptr, TransListT *tlist)
 ReadLog : read from log in sequence. More...
 
void ReadOne (::identt::utils::SharedTable::pointer stptr, TransactionT *trans)
 ReadOne : read a single transaction. More...
 
- Public Member Functions inherited from identt::store::StoreBase
std::string EncodeKeyType (KeyTypeE keytype)
 EncodeKeyType : make prefix key with keytype. More...
 
std::string EncodePrimaryKey (KeyTypeE keytype, ::google::protobuf::uint64 id)
 EncodePrimaryKey : make primary key with id only. More...
 
std::pair< KeyTypeE, uint64_t > DecodePrimaryKey (std::string &key)
 DecodePrimaryKey : get keytype and id from primary key. More...
 
template<typename T >
std::string EncodeSecondaryKey (KeyTypeE keytype, T key)
 EncodeSecondaryKey : make secondary key with one variable only. More...
 
template<typename T , typename U >
std::string EncodeSecondaryKey (KeyTypeE keytype, T key1, U key2)
 EncodeSecondaryKey : make secondary key with two variables. More...
 
template<typename T , typename U , typename V >
std::string EncodeSecondaryKey (KeyTypeE keytype, T key1, U key2, V key3)
 EncodeSecondaryKey : make secondary key with three variables. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, uint64_t key)
 1 value More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, std::string key)
 EncodeSecondaryKey : make secondary key with std::string : always unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, uint64_t key1, uint64_t key2)
 2 value More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, uint64_t key1, std::string key2)
 EncodeSecondaryKey : make secondary key with two keys uint64_t , std::string : always unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, std::string key1, uint64_t key2)
 EncodeSecondaryKey : make secondary key with two keys std::string , uint64_t : always unique : s-u unique , s non unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, std::string key1, std::string key2)
 EncodeSecondaryKey : make secondary key with two keys std::string , std::string : always unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, uint64_t key1, int32_t key2)
 EncodeSecondaryKey : make secondary key with two keys uint64_t, int32_t : always unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, uint64_t key1, uint64_t key2, uint64_t key3)
 3 value More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, uint64_t key1, uint64_t key2, std::string key3)
 EncodeSecondaryKey : make secondary key with three keys uint64_t , uint64_t , std::string : always unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, uint64_t key1, std::string key2, uint64_t key3)
 EncodeSecondaryKey : make secondary key with three keys uint64_t , std::string , uint64_t : always unique : u-s-u unique , u-s non unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, uint64_t key1, std::string key2, std::string key3)
 EncodeSecondaryKey : make secondary key with three keys uint64_t , std::string , std::string : always unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, std::string key1, uint64_t key2, uint64_t key3)
 EncodeSecondaryKey : make secondary key with three keys std::string , uint64_t , uint64_t : s-u-u unique , s-u non unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, std::string key1, uint64_t key2, std::string key3)
 EncodeSecondaryKey : make secondary key with three keys std::string , uint64_t , std::string : always unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, std::string key1, std::string key2, uint64_t key3)
 EncodeSecondaryKey : make secondary key with three keys std::string , std::string , uint64_t : s-s-u unique , s-s non unique. More...
 
template<>
std::string EncodeSecondaryKey (KeyTypeE keytype, std::string key1, std::string key2, std::string key3)
 EncodeSecondaryKey : make secondary key with three keys std::string , std::string , std::string : always unique. More...
 

Constructor & Destructor Documentation

§ StoreTrans()

identt::store::StoreTrans::StoreTrans ( )
default

Constructor.

Member Function Documentation

§ Commit()

void identt::store::StoreTrans::Commit ( ::identt::utils::SharedTable::pointer  stptr,
TransactionT *  trans,
bool  is_master 
)

Commit : write both transaction and log.

Parameters
stptr::identt::utils::SharedTable::pointer stptr
transTransactionT* transaction to handle
is_masterbool is_master
Returns
none

§ CommitData()

bool identt::store::StoreTrans::CommitData ( ::identt::utils::SharedTable::pointer  stptr,
TransactionT *  trans 
)

CommitData : write data.

Parameters
stptr::identt::utils::SharedTable::pointer stptr
transTransactionT* transaction to handle
Returns
bool status

§ CommitLog()

bool identt::store::StoreTrans::CommitLog ( ::identt::utils::SharedTable::pointer  stptr,
TransactionT *  trans,
bool  is_master 
)

CommitLog : write log ensure id is sequentially generated.

Parameters
stptr::identt::utils::SharedTable::pointer stptr
transTransactionT* transaction to handle
is_masterbool is_master
Returns
bool status

§ ReadLog()

void identt::store::StoreTrans::ReadLog ( ::identt::utils::SharedTable::pointer  stptr,
TransListT *  tlist 
)

ReadLog : read from log in sequence.

Parameters
stptr::identt::utils::SharedTable::pointer stptr
tlistTransListT* transaction list to handle
Returns
none

§ ReadOne()

void identt::store::StoreTrans::ReadOne ( ::identt::utils::SharedTable::pointer  stptr,
TransactionT *  trans 
)

ReadOne : read a single transaction.

Parameters
stptr::identt::utils::SharedTable::pointer stptr
transTransactionT* transaction to handle
Returns
none

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