45 template<
typename Key,
typename Val,
class Comp=
std::less<Key>,
class Alloc=
std::allocator<Val> >
127 template<
typename Key,
typename Data>
137 template<
typename Val>
144 explicit constexpr __stdcall criterion_t(
const clock_t c)
noexcept(
true)
150 template<
class MapT_>
bool __fastcall
151 operator()(
const MapT_ &val)
const noexcept(
true) {
152 return val.second.accessed()<=oldest;
156 const clock_t oldest;
159 constexpr __stdcall lru(
void);
161 __stdcall lru(
const lru &);
162 __stdcall ~
lru(
void);
168 clock_t
__fastcall accessed(
void)
const noexcept(
true);
170 template<
typename Iter>
static const criterion_t __fastcall
172 clock_t oldest=
std::numeric_limits<clock_t>::max();
174 oldest=
std::min(oldest,beg++->second.accessed());
207 static void __fastcall accessed(
void)
noexcept(
true) {}
208 static void __fastcall hit(
void)
noexcept(
true) {}
209 static void __fastcall reset(
void)
noexcept(
true) {}
210 static void __fastcall flushed(
void)
noexcept(
true) {}
248 void __fastcall accessed(
void)
noexcept(
true);
250 void __fastcall hit(
void)
noexcept(
true);
252 void __fastcall flushed(
void)
noexcept(
true);
254 void __fastcall reset(
void)
noexcept(
true);
280 virtual __stdcall ~
base(
void)
noexcept(
true);
285 virtual bool __fastcall empty()
const noexcept(
true)=0;
305 : data_factory_(f),id(i) {
308 : data_factory_(gw.data_factory_),id(gw.id) {
316 res.data=data_factory_.make(id);
337 : the_cache(r.the_cache) {
348 bool __fastcall operator<(
flush_cache const &)
const noexcept(
true) {
353 base<Factory> &the_cache;
414 :
base<Factory>(f),
low_water_mark(low_water),
high_water_mark(high_water), serialize(), flusher_pool(), populate_pool(num_threads), internal_cache(), statistics_() {
429 template<
typename Iter>
constexpr __stdcall
433 __stdcall ro(
const ro &);
434 virtual __stdcall ~
ro(
void)
noexcept(
true);
445 bool __fastcall empty(
void)
const noexcept(
true)
override;
460 void __fastcall clear(
void)
override;
470 template<
typename Iter>
void __fastcall
471 insert(
const Iter &beg,
const Iter &end) {
472 internal_cache.insert(beg, end);
473 flusher_pool<<flush_nonjoinable()<<flush_cache(*
this);
491 void __fastcall flush(
void)
override;
496 typedef FP victimization_traits;
497 typedef typename lock_traits::critical_section_type atomic_t;
498 typedef typename atomic_t::write_unlockable_type lock_t;
499 typedef typename thread_traits::flusher_pool_t::nonjoinable flush_nonjoinable;
501 mutable atomic_t serialize;
503 mutable typename thread_traits::populate_pool_t populate_pool;
504 mutable colln_t internal_cache;
511 template<
class F_,
class P_,
class TT_,
class S_>
tostream &
__fastcall
512 operator<<(
tostream &os,
const ro<F_,P_,TT_,S_> &r) {
513 os<<
_T(
"Low water-mark=")<<r.low_water_mark
514 <<
_T(
", high water-mark=")<<r.high_water_mark
515 <<
_T(
", current number of elements=")<<r.size();