NCBI C++ ToolKit
|
Search Toolkit Book for CInfoCache_Base
#include <objtools/data_loaders/genbank/impl/info_cache.hpp>
Public Types | |
enum | { kDefaultMaxSize = 10240 } |
Public Member Functions | |
CInfoCache_Base (CInfoManager::TMainMutex &mutex) | |
CInfoCache_Base (CInfoManager::TMainMutex &mutex, size_t max_size) | |
virtual | ~CInfoCache_Base (void) |
size_t | GetMaxGCQueueSize (void) const |
void | SetMaxGCQueueSize (size_t max_size) |
Protected Types | |
typedef CInfoManager::TMainMutex | TMainMutex |
typedef CMutex | TCacheMutex |
typedef CInfo_Base::TGCQueue | TGCQueue |
Protected Member Functions | |
void | x_SetInfo (CInfoLock_Base &lock, CInfoRequestor &requestor, CInfo_Base &info) |
void | x_AcquireLoadLock (TCacheMutex::TWriteLockGuard &guard, CInfoRequestorLock &lock, EDoNotWait do_not_wait) |
void | x_AcquireLoadLock (TMainMutex::TWriteLockGuard &guard, CInfoLock_Base &lock, EDoNotWait do_not_wait) |
bool | x_Check (const vector< const CInfo_Base * > &infos) const |
void | ReleaseInfos (const vector< CInfo_Base * > &infos) |
void | x_SetUsed (CInfo_Base &info) |
void | x_SetUnused (CInfo_Base &info) |
void | x_RemoveFromGCQueue (CInfo_Base &info) |
void | x_AddToGCQueue (CInfo_Base &info) |
void | x_GC (void) |
virtual void | x_ForgetInfo (CInfo_Base &info)=0 |
Protected Attributes | |
TCacheMutex | m_CacheMutex |
size_t | m_MaxGCQueueSize |
size_t | m_MinGCQueueSize |
size_t | m_CurGCQueueSize |
TGCQueue | m_GCQueue |
Friends | |
class | CInfoLock_Base |
class | CInfoManager |
class | CInfoRequestor |
Additional Inherited Members | |
Private Member Functions inherited from INoCopying | |
INoCopying () | |
Definition at line 427 of file info_cache.hpp.
|
protected |
Definition at line 455 of file info_cache.hpp.
|
protected |
Definition at line 502 of file info_cache.hpp.
|
protected |
Definition at line 450 of file info_cache.hpp.
anonymous enum |
Enumerator | |
---|---|
kDefaultMaxSize |
Definition at line 430 of file info_cache.hpp.
|
explicit |
Definition at line 374 of file info_cache.cpp.
References kDefaultMaxSize, and SetMaxGCQueueSize().
CInfoCache_Base::CInfoCache_Base | ( | CInfoManager::TMainMutex & | mutex, |
size_t | max_size | ||
) |
Definition at line 381 of file info_cache.cpp.
References SetMaxGCQueueSize().
|
virtual |
Definition at line 391 of file info_cache.cpp.
|
inline |
Definition at line 438 of file info_cache.hpp.
References m_MaxGCQueueSize.
|
protected |
Definition at line 480 of file info_cache.cpp.
References ITERATE, m_CacheMutex, and x_SetUnused().
void CInfoCache_Base::SetMaxGCQueueSize | ( | size_t | max_size | ) |
Definition at line 412 of file info_cache.cpp.
References m_CacheMutex, m_CurGCQueueSize, m_MaxGCQueueSize, m_MinGCQueueSize, and x_GC().
Referenced by CInfoCache_Base().
|
inlineprotected |
Definition at line 473 of file info_cache.hpp.
References CInfoRequestorLock::GetManager(), CGuard< Resource, Lock, Unlock, ReportExceptions >::Release(), and CInfoManager::x_AcquireLoadLock().
Referenced by CInfoCache< KeyType, DataType >::GetLoadLock(), and x_AcquireLoadLock().
|
inlineprotected |
Definition at line 481 of file info_cache.hpp.
References CInfoLock_Base::m_Lock, and x_AcquireLoadLock().
|
inlineprotected |
Definition at line 435 of file info_cache.cpp.
References _ASSERT, info, m_CurGCQueueSize, m_GCQueue, m_MaxGCQueueSize, Ref(), x_ForgetInfo(), and x_GC().
Referenced by x_SetUnused().
|
protected |
Definition at line 396 of file info_cache.cpp.
References _ASSERT, info, ITERATE, and m_CurGCQueueSize.
Referenced by CInfoCache< KeyType, DataType >::x_Check().
|
protectedpure virtual |
Implemented in CInfoCache< KeyType, DataType >.
Referenced by x_AddToGCQueue(), and x_GC().
|
protected |
Definition at line 489 of file info_cache.cpp.
References _ASSERT, info, m_CurGCQueueSize, m_GCQueue, m_MinGCQueueSize, x_ForgetInfo(), and x_RemoveFromGCQueue().
Referenced by SetMaxGCQueueSize(), and x_AddToGCQueue().
|
inlineprotected |
Definition at line 424 of file info_cache.cpp.
References _ASSERT, info, m_CurGCQueueSize, and m_GCQueue.
Referenced by x_GC(), and x_SetUsed().
|
protected |
Definition at line 472 of file info_cache.cpp.
References info, CInfoLock_Base::m_Lock, and CInfoRequestor::x_GetLock().
Referenced by CInfoCache< KeyType, DataType >::GetLoaded(), CInfoCache< KeyType, DataType >::GetLoadLock(), CInfoCache< KeyType, DataType >::SetLoaded(), and CInfoCache< KeyType, DataType >::SetLoadedFor().
|
inlineprotected |
Definition at line 463 of file info_cache.cpp.
References _ASSERT, info, and x_AddToGCQueue().
Referenced by ReleaseInfos().
|
inlineprotected |
Definition at line 453 of file info_cache.cpp.
References _ASSERT, info, m_GCQueue, and x_RemoveFromGCQueue().
Referenced by CInfoRequestor::x_GetLock().
|
friend |
Definition at line 446 of file info_cache.hpp.
|
friend |
Definition at line 447 of file info_cache.hpp.
|
friend |
Definition at line 448 of file info_cache.hpp.
|
protected |
Definition at line 456 of file info_cache.hpp.
Referenced by CInfoCache< KeyType, DataType >::GetLoaded(), CInfoCache< KeyType, DataType >::GetLoadLock(), CInfoCache< KeyType, DataType >::IsLoaded(), ReleaseInfos(), CInfoCache< KeyType, DataType >::SetLoaded(), CInfoCache< KeyType, DataType >::SetLoadedFor(), and SetMaxGCQueueSize().
|
protected |
Definition at line 504 of file info_cache.hpp.
Referenced by SetMaxGCQueueSize(), x_AddToGCQueue(), x_Check(), x_GC(), and x_RemoveFromGCQueue().
|
protected |
Definition at line 505 of file info_cache.hpp.
Referenced by CInfoCache< KeyType, DataType >::GetLoadLock(), CInfoCache< KeyType, DataType >::SetLoaded(), CInfoCache< KeyType, DataType >::SetLoadedFor(), x_AddToGCQueue(), x_GC(), x_RemoveFromGCQueue(), and x_SetUsed().
|
protected |
Definition at line 504 of file info_cache.hpp.
Referenced by GetMaxGCQueueSize(), SetMaxGCQueueSize(), and x_AddToGCQueue().
|
protected |
Definition at line 504 of file info_cache.hpp.
Referenced by SetMaxGCQueueSize(), and x_GC().