NCBI C++ ToolKit
|
Search Toolkit Book for CPubseqGatewayCacheBase
#include "psg_cache_base.hpp"
(Private to src/objtools/pubseq_gateway/cache
.)
Public Member Functions | |
CPubseqGatewayCacheBase (const string &file_name) | |
virtual | ~CPubseqGatewayCacheBase ()=default |
void | Open () |
void | UseReadAhead (bool value) |
Protected Member Functions | |
CLMDBReadOnlyTxn | BeginReadTxn () |
Protected Attributes | |
string | m_FileName |
unique_ptr< lmdb::env > | m_Env |
Private Attributes | |
bool | m_UseReadAhead {true} |
Definition at line 80 of file psg_cache_base.hpp.
|
explicit |
Definition at line 48 of file psg_cache_base.cpp.
References lmdb::env::create().
|
virtualdefault |
|
protected |
Definition at line 54 of file psg_cache_base.cpp.
References lmdb::txn::begin(), m_Env, and MDB_RDONLY.
Referenced by CPubseqGatewayCacheBlobProp::EnumerateBlobProp(), CPubseqGatewayCacheBioseqInfo::Fetch(), CPubseqGatewayCacheBlobProp::Fetch(), CPubseqGatewayCacheSi2Csi::Fetch(), CPubseqGatewayCacheSi2Csi::FetchLast(), CPubseqGatewayCacheBlobProp::FetchLast(), CPubseqGatewayCacheBioseqInfo::FetchLast(), CPubseqGatewayCacheBioseqInfo::Open(), CPubseqGatewayCacheSi2Csi::Open(), and CPubseqGatewayCacheBlobProp::Open().
void CPubseqGatewayCacheBase::Open | ( | void | ) |
Definition at line 59 of file psg_cache_base.cpp.
References flags, kLmdbMaxDbCount, kMapSizeDelta, kMapSizeInit, kMaxReaders, m_Env, m_FileName, m_UseReadAhead, MDB_NOMETASYNC, MDB_NORDAHEAD, MDB_NOSUBDIR, MDB_NOSYNC, MDB_RDONLY, lmdb::error::raise(), st(), and strerror().
Referenced by CPubseqGatewayCacheBioseqInfo::Open(), CPubseqGatewayCacheSi2Csi::Open(), and CPubseqGatewayCacheBlobProp::Open().
|
inline |
value | - true/false to enable/disable OS level read ahead |
Definition at line 90 of file psg_cache_base.hpp.
References m_UseReadAhead, and rapidjson::value.
|
protected |
Definition at line 98 of file psg_cache_base.hpp.
Referenced by BeginReadTxn(), CPubseqGatewayCacheBlobProp::EnumerateBlobProp(), CPubseqGatewayCacheBlobProp::Fetch(), CPubseqGatewayCacheSi2Csi::Fetch(), CPubseqGatewayCacheBlobProp::FetchLast(), Open(), CPubseqGatewayCacheBioseqInfo::Open(), CPubseqGatewayCacheSi2Csi::Open(), CPubseqGatewayCacheBlobProp::Open(), and CPubseqGatewayCacheBlobProp::x_CanOpenSatDatabase().
|
protected |
Definition at line 97 of file psg_cache_base.hpp.
Referenced by Open().
Definition at line 101 of file psg_cache_base.hpp.
Referenced by Open(), and UseReadAhead().