NCBI C++ ToolKit
|
Search Toolkit Book for CVDBGraphDataLoader_Impl
#include <sra/data_loaders/vdbgraph/impl/vdbgraphloader_impl.hpp>
Classes | |
struct | SVDBFileInfo |
Public Types | |
typedef vector< string > | TVDBFiles |
typedef CDataLoader::TBlobId | TBlobId |
typedef CDataLoader::TTSE_Lock | TTSE_Lock |
typedef CDataLoader::TTSE_LockSet | TTSE_LockSet |
typedef vector< CAnnotName > | TAnnotNames |
Public Types inherited from CObject | |
enum | EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern } |
Control filling of newly allocated memory. More... | |
typedef CObjectCounterLocker | TLockerType |
Default locker type for CRef. More... | |
typedef atomic< Uint8 > | TCounter |
Counter type is CAtomiCounter. More... | |
typedef Uint8 | TCount |
Alias for value type of counter. More... | |
Public Member Functions | |
CVDBGraphDataLoader_Impl (const TVDBFiles &vdb_files) | |
~CVDBGraphDataLoader_Impl (void) | |
CObjectManager::TPriority | GetDefaultPriority (void) const |
TAnnotNames | GetPossibleAnnotNames (void) const |
template<class Call > | |
std::invoke_result< Call >::type | CallWithRetry (Call &&call, const char *name, unsigned retry_count=0) |
TBlobId | GetBlobId (const CSeq_id_Handle &idh) |
TBlobId | GetBlobIdFromString (const string &str) const |
TTSE_Lock | GetBlobById (CDataSource *ds, const TBlobId &blob_id) |
TTSE_Lock | GetBlobByIdOnce (CDataSource *ds, const TBlobId &blob_id) |
TTSE_LockSet | GetRecords (CDataSource *ds, const CSeq_id_Handle &idh, CDataLoader::EChoice choice) |
TTSE_LockSet | GetOrphanAnnotRecords (CDataSource *ds, const CSeq_id_Handle &idh, const SAnnotSelector *sel, CDataLoader::TProcessedNAs *processed_nas) |
TTSE_LockSet | GetOrphanAnnotRecordsOnce (CDataSource *ds, const CSeq_id_Handle &idh, const SAnnotSelector *sel, CDataLoader::TProcessedNAs *processed_nas) |
void | GetChunk (CTSE_Chunk_Info &chunk) |
void | GetChunkOnce (CTSE_Chunk_Info &chunk) |
CRef< CSeq_entry > | LoadFullEntry (const CVDBGraphBlobId &blob_id) |
void | LoadSplitEntry (CTSE_Info &tse, const CVDBGraphBlobId &blob_id) |
CRef< SVDBFileInfo > | OpenVDBGraphFile (const string &name) |
CRef< SVDBFileInfo > | OpenVDBGraphFileOnce (const string &name) |
Public Member Functions inherited from CObject | |
CObject (void) | |
Constructor. More... | |
CObject (const CObject &src) | |
Copy constructor. More... | |
virtual | ~CObject (void) |
Destructor. More... | |
CObject & | operator= (const CObject &src) THROWS_NONE |
Assignment operator. More... | |
bool | CanBeDeleted (void) const THROWS_NONE |
Check if object can be deleted. More... | |
bool | IsAllocatedInPool (void) const THROWS_NONE |
Check if object is allocated in memory pool (not system heap) More... | |
bool | Referenced (void) const THROWS_NONE |
Check if object is referenced. More... | |
bool | ReferencedOnlyOnce (void) const THROWS_NONE |
Check if object is referenced only once. More... | |
void | AddReference (void) const |
Add reference to object. More... | |
void | RemoveReference (void) const |
Remove reference to object. More... | |
void | ReleaseReference (void) const |
Remove reference without deleting object. More... | |
virtual void | DoNotDeleteThisObject (void) |
Mark this object as not allocated in heap – do not delete this object. More... | |
virtual void | DoDeleteThisObject (void) |
Mark this object as allocated in heap – object can be deleted. More... | |
void * | operator new (size_t size) |
Define new operator for memory allocation. More... | |
void * | operator new[] (size_t size) |
Define new[] operator for 'array' memory allocation. More... | |
void | operator delete (void *ptr) |
Define delete operator for memory deallocation. More... | |
void | operator delete[] (void *ptr) |
Define delete[] operator for memory deallocation. More... | |
void * | operator new (size_t size, void *place) |
Define new operator. More... | |
void | operator delete (void *ptr, void *place) |
Define delete operator. More... | |
void * | operator new (size_t size, CObjectMemoryPool *place) |
Define new operator using memory pool. More... | |
void | operator delete (void *ptr, CObjectMemoryPool *place) |
Define delete operator. More... | |
virtual void | DebugDump (CDebugDumpContext ddc, unsigned int depth) const |
Define method for dumping debug information. More... | |
Public Member Functions inherited from CDebugDumpable | |
CDebugDumpable (void) | |
virtual | ~CDebugDumpable (void) |
void | DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const |
void | DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const |
void | DumpToConsole (void) const |
Protected Types | |
typedef map< string, CRef< SVDBFileInfo > > | TFixedFileMap |
typedef limited_size_map< string, CRef< SVDBFileInfo > > | TAutoFileMap |
typedef limited_size_map< string, bool > | TMissingFileSet |
Protected Member Functions | |
CRef< SVDBFileInfo > | x_GetFileInfo (const string &name) |
CRef< SVDBFileInfo > | x_GetNAFileInfo (const string &na_acc) |
Protected Member Functions inherited from CObject | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
Protected Attributes | |
CMutex | m_Mutex |
CVDBMgr | m_Mgr |
unsigned | m_RetryCount |
TFixedFileMap | m_FixedFileMap |
TAutoFileMap | m_AutoFileMap |
TMissingFileSet | m_MissingFileSet |
Additional Inherited Members | |
Static Public Member Functions inherited from CObject | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (void) |
Define method to throw null pointer exception. More... | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (const type_info &type) |
static EAllocFillMode | GetAllocFillMode (void) |
static void | SetAllocFillMode (EAllocFillMode mode) |
static void | SetAllocFillMode (const string &value) |
Set mode from configuration parameter value. More... | |
Static Public Member Functions inherited from CDebugDumpable | |
static void | EnableDebugDump (bool on) |
Static Public Attributes inherited from CObject | |
static const TCount | eCounterBitsCanBeDeleted = 1 << 0 |
Define possible object states. More... | |
static const TCount | eCounterBitsInPlainHeap = 1 << 1 |
Heap signature was found. More... | |
static const TCount | eCounterBitsPlaceMask |
Mask for 'in heap' state flags. More... | |
static const int | eCounterStep = 1 << 2 |
Skip over the "in heap" bits. More... | |
static const TCount | eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2) |
Minimal value for valid objects (reference counter is zero) Must be a single bit value. More... | |
static const TCount | eCounterStateMask |
Valid object, and object in heap. More... | |
Definition at line 49 of file vdbgraphloader_impl.hpp.
typedef vector<CAnnotName> CVDBGraphDataLoader_Impl::TAnnotNames |
Definition at line 62 of file vdbgraphloader_impl.hpp.
|
protected |
Definition at line 107 of file vdbgraphloader_impl.hpp.
Definition at line 53 of file vdbgraphloader_impl.hpp.
|
protected |
Definition at line 106 of file vdbgraphloader_impl.hpp.
|
protected |
Definition at line 108 of file vdbgraphloader_impl.hpp.
Definition at line 54 of file vdbgraphloader_impl.hpp.
Definition at line 55 of file vdbgraphloader_impl.hpp.
typedef vector<string> CVDBGraphDataLoader_Impl::TVDBFiles |
Definition at line 52 of file vdbgraphloader_impl.hpp.
Definition at line 239 of file vdbgraphloader_impl.cpp.
References GetDebugLevel(), info, ITERATE, LOG_POST_X, m_FixedFileMap, and OpenVDBGraphFile().
CVDBGraphDataLoader_Impl::~CVDBGraphDataLoader_Impl | ( | void | ) |
Definition at line 254 of file vdbgraphloader_impl.cpp.
std::invoke_result< Call >::type CVDBGraphDataLoader_Impl::CallWithRetry | ( | Call && | call, |
const char * | name, | ||
unsigned | retry_count = 0 |
||
) |
Definition at line 261 of file vdbgraphloader_impl.cpp.
References LOG_POST, m_RetryCount, SleepMilliSec(), t, Warning(), and CException::what().
Referenced by GetBlobById(), GetChunk(), GetOrphanAnnotRecords(), and OpenVDBGraphFile().
CDataLoader::TTSE_Lock CVDBGraphDataLoader_Impl::GetBlobById | ( | CDataSource * | ds, |
const TBlobId & | blob_id | ||
) |
Definition at line 383 of file vdbgraphloader_impl.cpp.
References CallWithRetry(), and GetBlobByIdOnce().
Referenced by CVDBGraphDataLoader::GetBlobById(), and GetOrphanAnnotRecordsOnce().
CDataLoader::TTSE_Lock CVDBGraphDataLoader_Impl::GetBlobByIdOnce | ( | CDataSource * | ds, |
const TBlobId & | blob_id | ||
) |
Definition at line 393 of file vdbgraphloader_impl.cpp.
References CDataSource::GetTSE_LoadLock(), CTSE_LoadLock::IsLoaded(), LoadFullEntry(), LoadSplitEntry(), CTSE_LoadLock::SetLoaded(), and CTSE_Info::SetSeq_entry().
Referenced by GetBlobById().
CDataLoader::TBlobId CVDBGraphDataLoader_Impl::GetBlobId | ( | const CSeq_id_Handle & | idh | ) |
Definition at line 368 of file vdbgraphloader_impl.cpp.
Referenced by CVDBGraphDataLoader::GetBlobId().
CDataLoader::TBlobId CVDBGraphDataLoader_Impl::GetBlobIdFromString | ( | const string & | str | ) | const |
Definition at line 376 of file vdbgraphloader_impl.cpp.
References str().
Referenced by CVDBGraphDataLoader::GetBlobIdFromString().
void CVDBGraphDataLoader_Impl::GetChunk | ( | CTSE_Chunk_Info & | chunk | ) |
Definition at line 598 of file vdbgraphloader_impl.cpp.
References CallWithRetry(), and GetChunkOnce().
Referenced by CVDBGraphDataLoader::GetChunk().
void CVDBGraphDataLoader_Impl::GetChunkOnce | ( | CTSE_Chunk_Info & | chunk | ) |
Definition at line 606 of file vdbgraphloader_impl.cpp.
References CVDBGraphSeqIterator::fGraphMain, CVDBGraphSeqIterator::fGraphMainAsTable, CVDBGraphSeqIterator::fGraphQAll, CVDBGraphSeqIterator::fGraphZoomQAll, flags, CVDBGraphSeqIterator::GetAnnot(), CTSE_Chunk_Info::GetBlobId(), CTSE_Chunk_Info::GetChunkId(), GetDebugLevel(), CVDBGraphSeqIterator::GetSeqLength(), i, info, kChunkIdMul, kFlags, kMainChunkSize, kMidZoomChunkSize, kOverviewChunkSize, kTSEId, LOG_POST_X, CVDBGraphBlobId::m_FileInfo, CVDBGraphBlobId::m_SeqId, CVDBGraphBlobId::m_VDBFile, min(), MSerial_AsnText, CTSE_Chunk_Info::SetLoaded(), x_GetFileInfo(), and CTSE_Chunk_Info::x_LoadAnnot().
Referenced by GetChunk().
CObjectManager::TPriority CVDBGraphDataLoader_Impl::GetDefaultPriority | ( | void | ) | const |
Definition at line 340 of file vdbgraphloader_impl.cpp.
References map_checker< Container >::empty(), CObjectManager::kPriority_Extra, and m_FixedFileMap.
Referenced by CVDBGraphDataLoader::GetDefaultPriority().
CDataLoader::TTSE_LockSet CVDBGraphDataLoader_Impl::GetOrphanAnnotRecords | ( | CDataSource * | ds, |
const CSeq_id_Handle & | idh, | ||
const SAnnotSelector * | sel, | ||
CDataLoader::TProcessedNAs * | processed_nas | ||
) |
Definition at line 426 of file vdbgraphloader_impl.cpp.
References CallWithRetry(), and GetOrphanAnnotRecordsOnce().
Referenced by CVDBGraphDataLoader::GetOrphanAnnotRecordsNA(), and GetRecords().
CDataLoader::TTSE_LockSet CVDBGraphDataLoader_Impl::GetOrphanAnnotRecordsOnce | ( | CDataSource * | ds, |
const CSeq_id_Handle & | idh, | ||
const SAnnotSelector * | sel, | ||
CDataLoader::TProcessedNAs * | processed_nas | ||
) |
Definition at line 438 of file vdbgraphloader_impl.cpp.
References map_checker< Container >::empty(), file, limited_size_map< Key, Value, Less >::get_size_limit(), GetBlobById(), GetGCSize(), GetMissingGCSize(), SAnnotSelector::GetNamedAnnotAccessions(), CDataSource::GetTSE_LoadLockIfLoaded(), set< Key, Compare >::insert(), CDataLoader::IsRequestedAnyNA(), CDataLoader::IsRequestedNA(), ITERATE, m_AutoFileMap, m_FixedFileMap, m_MissingFileSet, limited_size_map< Key, Value, Less >::set_size_limit(), CDataLoader::SetProcessedNA(), map_checker< Container >::size(), and x_GetNAFileInfo().
Referenced by GetOrphanAnnotRecords().
CVDBGraphDataLoader_Impl::TAnnotNames CVDBGraphDataLoader_Impl::GetPossibleAnnotNames | ( | void | ) | const |
Definition at line 352 of file vdbgraphloader_impl.cpp.
References info, ITERATE, m_FixedFileMap, names, and ct::sort().
Referenced by CVDBGraphDataLoader::GetPossibleAnnotNames().
CDataLoader::TTSE_LockSet CVDBGraphDataLoader_Impl::GetRecords | ( | CDataSource * | ds, |
const CSeq_id_Handle & | idh, | ||
CDataLoader::EChoice | choice | ||
) |
Definition at line 413 of file vdbgraphloader_impl.cpp.
References CDataLoader::eAll, CDataLoader::eOrphanAnnot, and GetOrphanAnnotRecords().
Referenced by CVDBGraphDataLoader::GetRecords().
CRef< CSeq_entry > CVDBGraphDataLoader_Impl::LoadFullEntry | ( | const CVDBGraphBlobId & | blob_id | ) |
Definition at line 490 of file vdbgraphloader_impl.cpp.
References CVDBGraphSeqIterator::fGraphMain, CVDBGraphSeqIterator::fGraphMainAsTable, CVDBGraphSeqIterator::fGraphQAll, CVDBGraphSeqIterator::fGraphZoomQAll, CVDBGraphSeqIterator::GetAnnot(), GetDebugLevel(), GetEnabledMidZoom(), GetEnabledOverview(), GetUseTable(), COpenRange< Position >::GetWhole(), info, LOG_POST_X, CVDBGraphBlobId::m_SeqId, CVDBGraphBlobId::m_VDBFile, compile_time_bits::range(), CVDBGraphSeqIterator::SeqTableIsSmaller(), CBioseq_set_Base::SetAnnot(), CBioseq_set_Base::SetSeq_set(), CSeq_entry_Base::SetSet(), and x_GetFileInfo().
Referenced by GetBlobByIdOnce().
void CVDBGraphDataLoader_Impl::LoadSplitEntry | ( | CTSE_Info & | tse, |
const CVDBGraphBlobId & | blob_id | ||
) |
Definition at line 530 of file vdbgraphloader_impl.cpp.
References CTSE_Split_Info::AddChunk(), CSeq_annot_Base::C_Data::e_Graph, CSeq_annot_Base::C_Data::e_Seq_table, GetDebugLevel(), GetEnabledMidZoom(), GetEnabledOverview(), CVDBGraphSeqIterator::GetSeq_id_Handle(), CVDBGraphSeqIterator::GetSeqLength(), CTSE_Info::GetSplitInfo(), GetUseTable(), i, info, int, kChunkIdMul, kMainChunkSize, kMainGraphChunkIdAdd, kMainTableChunkIdAdd, kMidZoomChunkIdAdd, kMidZoomChunkSize, kName, kOverviewChunkIdAdd, kOverviewChunkSize, kTSEId, LOG_POST_X, CVDBGraphBlobId::m_SeqId, CVDBGraphBlobId::m_VDBFile, min(), compile_time_bits::range(), CVDBGraphSeqIterator::SeqTableIsSmaller(), CBioseq_set_Base::SetId(), CTSE_Info::SetSeq_entry(), CBioseq_set_Base::SetSeq_set(), CSeq_entry_Base::SetSet(), CTSE_Chunk_Info::x_AddAnnotPlace(), CTSE_Chunk_Info::x_AddAnnotType(), and x_GetFileInfo().
Referenced by GetBlobByIdOnce().
CRef< CVDBGraphDataLoader_Impl::SVDBFileInfo > CVDBGraphDataLoader_Impl::OpenVDBGraphFile | ( | const string & | name | ) |
Definition at line 303 of file vdbgraphloader_impl.cpp.
References CallWithRetry(), and OpenVDBGraphFileOnce().
Referenced by CVDBGraphDataLoader_Impl().
CRef< CVDBGraphDataLoader_Impl::SVDBFileInfo > CVDBGraphDataLoader_Impl::OpenVDBGraphFileOnce | ( | const string & | name | ) |
Definition at line 312 of file vdbgraphloader_impl.cpp.
References GetLookupType(), CDirEntry::GetName(), info, and m_Mgr.
Referenced by OpenVDBGraphFile().
|
protected |
Definition at line 723 of file vdbgraphloader_impl.cpp.
References map_checker< Container >::end(), map_checker< Container >::find(), m_FixedFileMap, and x_GetNAFileInfo().
Referenced by GetChunkOnce(), LoadFullEntry(), and LoadSplitEntry().
|
protected |
Definition at line 681 of file vdbgraphloader_impl.cpp.
References map_checker< Container >::empty(), limited_size_map< Key, Value, Less >::end(), CSraException::eNotFoundDb, limited_size_map< Key, Value, Less >::find(), GetDebugLevel(), CSraException::GetErrCode(), GetLookupType(), info, LOG_POST_X, m_AutoFileMap, m_FixedFileMap, m_Mgr, m_MissingFileSet, m_Mutex, and sx_IsNA().
Referenced by GetOrphanAnnotRecordsOnce(), and x_GetFileInfo().
|
protected |
Definition at line 118 of file vdbgraphloader_impl.hpp.
Referenced by GetOrphanAnnotRecordsOnce(), and x_GetNAFileInfo().
|
protected |
Definition at line 117 of file vdbgraphloader_impl.hpp.
Referenced by CVDBGraphDataLoader_Impl(), GetDefaultPriority(), GetOrphanAnnotRecordsOnce(), GetPossibleAnnotNames(), x_GetFileInfo(), and x_GetNAFileInfo().
|
protected |
Definition at line 115 of file vdbgraphloader_impl.hpp.
Referenced by OpenVDBGraphFileOnce(), and x_GetNAFileInfo().
|
protected |
Definition at line 119 of file vdbgraphloader_impl.hpp.
Referenced by GetOrphanAnnotRecordsOnce(), and x_GetNAFileInfo().
|
protected |
Definition at line 114 of file vdbgraphloader_impl.hpp.
Referenced by x_GetNAFileInfo().
|
protected |
Definition at line 116 of file vdbgraphloader_impl.hpp.
Referenced by CallWithRetry().