RippleLineCache::RippleStateVector const& RippleLineCache::getRippleLines (AccountID const& accountID) { AccountKey key (accountID, hasher_ (accountID)); std::lock_guard <std::mutex> sl (mLock); auto it = mRLMap.emplace (key, RippleStateVector ()); if (it.second) it.first->second = ripple::getRippleStateItems (accountID, *mLedger); return it.first->second; }
DivvyLineCache::DivvyStateVector const& DivvyLineCache::getDivvyLines (AccountID const& accountID) { AccountKey key (accountID, hasher_ (accountID)); ScopedLockType sl (mLock); auto it = mRLMap.emplace (key, DivvyStateVector ()); if (it.second) it.first->second = divvy::getDivvyStateItems (accountID, mLedger); return it.first->second; }
ripplelinecache::ripplestatevector const& ripplelinecache::getripplelines (account const& accountid) { accountkey key (accountid, hasher_ (accountid)); scopedlocktype sl (mlock); auto it = mrlmap.emplace (key, ripplestatevector ()); if (it.second) it.first->second = ripple::getripplestateitems (accountid, mledger); return it.first->second; }
std::size_t operator()(::hpx::threads::thread_id_type const& v) const { std::hash<std::size_t> hasher_; return hasher_(reinterpret_cast<std::size_t>(v.get())); }