identt
Public Member Functions | Protected Attributes | List of all members
identt::store::StoreLevel Class Reference
Inheritance diagram for identt::store::StoreLevel:
identt::store::StoreBase identt::store::StoreTable< T > identt::store::StoreTablePrint identt::store::StoreTable< AccessKeyT > identt::store::StoreTable< BlobStoreT > identt::store::StoreTable< EphemeralPublicKeyT > identt::store::StoreTable< GlobalAssocT > identt::store::StoreTable< InviteTokenT > identt::store::StoreTable< LocalAssocT > identt::store::StoreTable< MailSentT > identt::store::StoreTable< ParAvionT > identt::store::StoreTable< PeerPubKeyT > identt::store::StoreTable< PeerT > identt::store::StoreTable< TokenAuthT > identt::store::StoreTable< TransLogT > identt::store::StoreTable< ValidationSessionT >

Public Member Functions

 StoreLevel (dbpointer trydb)
 Constructor. More...
 
 StoreLevel (const StoreLevel &)=delete
 make noncopyable and remove default
 
StoreLeveloperator= (const StoreLevel &)=delete
 
void Initialize (const std::string datadir, const size_t cache_in_mb, uint64_t &last_pkey, uint64_t &last_lkey)
 Initialize: init main db. More...
 
dbpointer getDB ()
 getDB: Get shared pointer to DB 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...
 

Protected Attributes

dbpointer db
 

Constructor & Destructor Documentation

§ StoreLevel()

identt::store::StoreLevel::StoreLevel ( dbpointer  trydb)

Constructor.

Parameters
trydbdbpointer shared pointer to db

Member Function Documentation

§ getDB()

identt::store::StoreLevel::dbpointer identt::store::StoreLevel::getDB ( )

getDB: Get shared pointer to DB

Returns
dbpointer

§ Initialize()

void identt::store::StoreLevel::Initialize ( const std::string  datadir,
const size_t  cache_in_mb,
uint64_t &  last_pkey,
uint64_t &  last_lkey 
)

Initialize: init main db.

Parameters
datadirstd::string data directory to store
cache_in_mbsize_t cache size in MB
last_pkeyuint64_t& last primary key
last_lkeyuint64_t& last log key
Returns
none

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