NCBI C++ ToolKit
|
Search Toolkit Book for CExcludeBlobCache
#include "exclude_blob_cache.hpp"
(Private to src/app/pubseq_gateway/server
.)
Public Member Functions | |
CExcludeBlobCache (size_t inactivity_timeout, size_t max_cache_size, size_t purged_size) | |
~CExcludeBlobCache () | |
EPSGS_CacheAddResult | AddBlobId (const string &user, const SExcludeBlobId &blob_id, bool &completed, psg_time_point_t &completed_time) |
bool | IsInCache (const string &user, const SExcludeBlobId &blob_id, bool &completed, psg_time_point_t &completed_time) |
bool | SetCompleted (const string &user, const SExcludeBlobId &blob_id, bool new_val) |
bool | Remove (const string &user, const SExcludeBlobId &blob_id) |
void | Purge (void) |
size_t | Size (void) |
Private Attributes | |
map< string, CUserExcludeBlobs * > | m_UserBlobs |
mutex | m_Lock |
CUserExcludeBlobsPool | m_Pool |
chrono::seconds | m_InactivityTimeout |
size_t | m_MaxCacheSize |
size_t | m_PurgedSize |
vector< CUserExcludeBlobs * > | m_ToPurge |
vector< CUserExcludeBlobs * > | m_ToDiscard |
Definition at line 206 of file exclude_blob_cache.hpp.
|
inline |
Definition at line 209 of file exclude_blob_cache.hpp.
|
inline |
Definition at line 218 of file exclude_blob_cache.hpp.
EPSGS_CacheAddResult CExcludeBlobCache::AddBlobId | ( | const string & | user, |
const SExcludeBlobId & | blob_id, | ||
bool & | completed, | ||
psg_time_point_t & | completed_time | ||
) |
Definition at line 136 of file exclude_blob_cache.cpp.
References CUserExcludeBlobs::AddBlobId(), ePSGS_Added, CUserExcludeBlobsPool::Get(), CUserExcludeBlobs::m_Lock, m_Lock, m_MaxCacheSize, m_Pool, and m_UserBlobs.
bool CExcludeBlobCache::IsInCache | ( | const string & | user, |
const SExcludeBlobId & | blob_id, | ||
bool & | completed, | ||
psg_time_point_t & | completed_time | ||
) |
Definition at line 168 of file exclude_blob_cache.cpp.
References CUserExcludeBlobs::IsInCache(), CUserExcludeBlobs::m_Lock, m_Lock, m_MaxCacheSize, and m_UserBlobs.
void CExcludeBlobCache::Purge | ( | void | ) |
Definition at line 261 of file exclude_blob_cache.cpp.
References m_InactivityTimeout, m_Lock, m_MaxCacheSize, m_Pool, m_PurgedSize, m_ToDiscard, m_ToPurge, m_UserBlobs, and CUserExcludeBlobsPool::Return().
Referenced by CollectGarbage().
bool CExcludeBlobCache::Remove | ( | const string & | user, |
const SExcludeBlobId & | blob_id | ||
) |
Definition at line 230 of file exclude_blob_cache.cpp.
References CUserExcludeBlobs::m_Lock, m_Lock, m_MaxCacheSize, m_UserBlobs, and CUserExcludeBlobs::Remove().
bool CExcludeBlobCache::SetCompleted | ( | const string & | user, |
const SExcludeBlobId & | blob_id, | ||
bool | new_val | ||
) |
Definition at line 200 of file exclude_blob_cache.cpp.
References CUserExcludeBlobs::m_Lock, m_Lock, m_MaxCacheSize, m_UserBlobs, and CUserExcludeBlobs::SetCompleted().
|
inline |
Definition at line 244 of file exclude_blob_cache.hpp.
References ncbi::grid::netcache::search::fields::size.
|
private |
Definition at line 257 of file exclude_blob_cache.hpp.
Referenced by Purge().
|
private |
Definition at line 254 of file exclude_blob_cache.hpp.
Referenced by AddBlobId(), IsInCache(), Purge(), Remove(), and SetCompleted().
|
private |
Definition at line 258 of file exclude_blob_cache.hpp.
Referenced by AddBlobId(), IsInCache(), Purge(), Remove(), and SetCompleted().
|
private |
Definition at line 255 of file exclude_blob_cache.hpp.
Referenced by AddBlobId(), and Purge().
|
private |
Definition at line 259 of file exclude_blob_cache.hpp.
Referenced by Purge().
|
private |
Definition at line 262 of file exclude_blob_cache.hpp.
Referenced by Purge().
|
private |
Definition at line 261 of file exclude_blob_cache.hpp.
Referenced by Purge().
|
private |
Definition at line 253 of file exclude_blob_cache.hpp.
Referenced by AddBlobId(), IsInCache(), Purge(), Remove(), and SetCompleted().