33 #ifndef _IDENTT_STORE_STORECACHE_HPP_ 34 #define _IDENTT_STORE_STORECACHE_HPP_ 37 #include <unordered_map> 40 #include <boost/thread/locks.hpp> 41 #include <boost/thread/shared_mutex.hpp> 50 using pointer=std::shared_ptr<StoreCache>;
51 using LockT = boost::shared_mutex;
52 using WriteLockT = boost::unique_lock< LockT >;
53 using ReadLockT = boost::shared_lock< LockT >;
56 using AssocT = std::string;
57 using AssocMapT = std::unordered_map<std::string,AssocT>;
93 void SetAssoc(std::string hash, AssocT assoc);
108 bool GetAssoc(std::string hash, AssocT& assoc);
static pointer create()
create : static construction creates new first time
Definition: StoreCache.hpp:65
void AddToCache(TransactionT *trans)
AddToCache : adds a transaction to cache.
Definition: StoreCache.cc:90
Definition: StoreCache.hpp:47
void DelAssoc(std::string hash)
DelAssoc : del assoc entry.
Definition: StoreCache.cc:77
Definition: StoreBase.hpp:58
void SetAssoc(std::string hash, AssocT assoc)
SetAssoc : add an assoc entry.
Definition: StoreCache.cc:51
Definition: CryptoBase.hpp:49
bool GetAssoc(std::string hash, AssocT &assoc)
GetAssoc : get assoc.
Definition: StoreCache.cc:62
virtual ~StoreCache()
destructor
Definition: StoreCache.cc:45