NCBI C++ ToolKit
|
Search Toolkit Book for CReadDispatcher
#include <objtools/data_loaders/genbank/impl/dispatcher.hpp>
Public Types | |
typedef CReader::TContentsMask | TContentsMask |
typedef CReader::TBlobState | TBlobState |
typedef CReader::TBlobVersion | TBlobVersion |
typedef CReader::TBlobId | TBlobId |
typedef CReader::TChunkId | TChunkId |
typedef CReader::TChunkIds | TChunkIds |
typedef size_t | TLevel |
typedef vector< CSeq_id_Handle > | TIds |
typedef vector< bool > | TLoaded |
typedef vector< bool > | TKnown |
typedef vector< TGi > | TGis |
typedef vector< string > | TLabels |
typedef vector< TTaxId > | TTaxIds |
typedef vector< int > | THashes |
typedef vector< TSeqPos > | TLengths |
typedef vector< CSeq_inst::EMol > | TTypes |
typedef vector< TBlobState > | TStates |
![]() | |
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... | |
Static Public Member Functions | |
static bool | CannotProcess (const CSeq_id_Handle &sih) |
static bool | SetBlobState (size_t i, CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TStates &ret) |
static int | CollectStatistics (void) |
static void | LogStat (CReadDispatcherCommand &command, CReaderRequestResultRecursion &recursion) |
static void | LogStat (CReadDispatcherCommand &command, CReaderRequestResultRecursion &recursion, double size) |
![]() | |
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 void | EnableDebugDump (bool on) |
Private Types | |
typedef map< TLevel, CRef< CReader > > | TReaders |
typedef map< TLevel, CRef< CWriter > > | TWriters |
typedef map< CProcessor::EType, CRef< CProcessor > > | TProcessors |
Private Attributes | |
TReaders | m_Readers |
TWriters | m_Writers |
TProcessors | m_Processors |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
Definition at line 58 of file dispatcher.hpp.
Definition at line 64 of file dispatcher.hpp.
Definition at line 62 of file dispatcher.hpp.
Definition at line 63 of file dispatcher.hpp.
Definition at line 65 of file dispatcher.hpp.
Definition at line 66 of file dispatcher.hpp.
Definition at line 61 of file dispatcher.hpp.
typedef vector<TGi> CReadDispatcher::TGis |
Definition at line 108 of file dispatcher.hpp.
typedef vector<int> CReadDispatcher::THashes |
Definition at line 111 of file dispatcher.hpp.
typedef vector<CSeq_id_Handle> CReadDispatcher::TIds |
Definition at line 68 of file dispatcher.hpp.
typedef vector<bool> CReadDispatcher::TKnown |
Definition at line 107 of file dispatcher.hpp.
typedef vector<string> CReadDispatcher::TLabels |
Definition at line 109 of file dispatcher.hpp.
typedef vector<TSeqPos> CReadDispatcher::TLengths |
Definition at line 112 of file dispatcher.hpp.
typedef size_t CReadDispatcher::TLevel |
Definition at line 67 of file dispatcher.hpp.
typedef vector<bool> CReadDispatcher::TLoaded |
Definition at line 106 of file dispatcher.hpp.
|
private |
Definition at line 178 of file dispatcher.hpp.
|
private |
Definition at line 176 of file dispatcher.hpp.
typedef vector<TBlobState> CReadDispatcher::TStates |
Definition at line 114 of file dispatcher.hpp.
typedef vector<TTaxId> CReadDispatcher::TTaxIds |
Definition at line 110 of file dispatcher.hpp.
typedef vector<CSeq_inst::EMol> CReadDispatcher::TTypes |
Definition at line 113 of file dispatcher.hpp.
|
private |
Definition at line 177 of file dispatcher.hpp.
CReadDispatcher::CReadDispatcher | ( | void | ) |
Definition at line 158 of file dispatcher.cpp.
References CollectStatistics(), and CProcessor::RegisterAllProcessors().
CReadDispatcher::~CReadDispatcher | ( | void | ) |
Definition at line 165 of file dispatcher.cpp.
References CollectStatistics(), and CGBRequestStatistics::PrintStatistics().
|
static |
Definition at line 261 of file dispatcher.cpp.
References CSeq_id_Base::e_General, CSeq_id_Base::e_Local, NStr::EqualNocase(), CDbtag_Base::GetDb(), CSeq_id_Base::GetGeneral(), CSeq_id_Handle::GetSeqId(), and CSeq_id_Handle::Which().
Referenced by CGBDataLoader_Native::GetAccVerFound(), CGBDataLoader_Native::GetAccVers(), CGBDataLoader_Native::GetBlobId(), CGBDataLoader_Native::GetBlobs(), CGBDataLoader_Native::GetGiFound(), CGBDataLoader_Native::GetGis(), CGBDataLoader_Native::GetIds(), CGBDataLoader_Native::GetLabel(), CGBDataLoader_Native::GetLabels(), CGBDataLoader_Native::GetSequenceHashes(), CGBDataLoader_Native::GetSequenceHashFound(), CGBDataLoader_Native::GetSequenceLength(), CGBDataLoader_Native::GetSequenceLengths(), CGBDataLoader_Native::GetSequenceState(), CGBDataLoader_Native::GetSequenceStates(), CGBDataLoader_Native::GetSequenceTypeFound(), CGBDataLoader_Native::GetSequenceTypes(), CGBDataLoader_Native::GetTaxId(), CGBDataLoader_Native::GetTaxIds(), CCacheReader::LoadAccVers(), CId2ReaderBase::LoadAccVers(), CReader::LoadAccVers(), CCacheReader::LoadGis(), CId2ReaderBase::LoadGis(), CReader::LoadGis(), CId2ReaderBase::LoadHashes(), CReader::LoadHashes(), CCacheReader::LoadLabels(), CId2ReaderBase::LoadLabels(), CReader::LoadLabels(), CId2ReaderBase::LoadLengths(), CReader::LoadLengths(), CReader::LoadStates(), CCacheReader::LoadTaxIds(), CId2ReaderBase::LoadTaxIds(), CReader::LoadTaxIds(), CId2ReaderBase::LoadTypes(), CReader::LoadTypes(), SetBlobState(), and CGBDataLoader_Native::x_GetRecords().
void CReadDispatcher::CheckReaders | ( | void | ) | const |
Definition at line 231 of file dispatcher.cpp.
References map_checker< Container >::empty(), m_Readers, and NCBI_THROW.
Referenced by Process().
|
inlinestatic |
Definition at line 151 of file dispatcher.cpp.
References NCBI_PARAM_TYPE, and ncbi::grid::netcache::search::s_Value().
Referenced by CReadDispatcher(), LogStat(), and ~CReadDispatcher().
const CProcessor & CReadDispatcher::GetProcessor | ( | CProcessor::EType | type | ) | const |
Definition at line 219 of file dispatcher.cpp.
References map_checker< Container >::end(), map_checker< Container >::find(), m_Processors, and NCBI_THROW_FMT.
Referenced by CId1Reader::GetBlob(), CPubseqReader::GetBlob(), CId1ReaderBase::LoadBlob(), CId2ReaderBase::LoadBlob(), CId2ReaderBase::LoadBlobs(), CSplitCacheApp::ProcessBlob(), CProcessor_ID2::ProcessData(), CSplitCacheApp::ProcessEntry(), CProcessor_ID1_SNP::ProcessObjStream(), CProcessor_SE::ProcessObjStream(), CProcessor_SE_SNP::ProcessObjStream(), CProcessor_St_SE::ProcessObjStream(), CCacheReader::x_ProcessBlob(), CId2ReaderBase::x_ProcessGetBlob(), CId2ReaderBase::x_ProcessGetChunk(), and CId2ReaderBase::x_ProcessGetSplitInfo().
CWriter * CReadDispatcher::GetWriter | ( | const CReaderRequestResult & | result, |
CWriter::EType | type | ||
) | const |
Definition at line 204 of file dispatcher.cpp.
References i, ITERATE, m_Writers, and result.
Referenced by CReaderRequestResult::GetBlobWriter(), CReaderRequestResult::GetIdWriter(), CProcessor::GetWriter(), CId2ReaderBase::LoadBlobs(), CSplitCacheApp::ProcessBlob(), CSplitCacheApp::ProcessEntry(), and CSplitCacheApp::SetupCache().
bool CReadDispatcher::HasReaderWithHUPIncluded | ( | ) | const |
Definition at line 239 of file dispatcher.cpp.
References m_Readers.
Referenced by CGBDataLoader_Native::x_CreateWriters().
void CReadDispatcher::InsertProcessor | ( | CRef< CProcessor > | processor | ) |
Definition at line 194 of file dispatcher.cpp.
References CProcessor::GetType(), and m_Processors.
Referenced by CProcessor::RegisterAllProcessors().
Definition at line 173 of file dispatcher.cpp.
References CReader::m_Dispatcher, and m_Readers.
Referenced by CGBDataLoader_Native::x_CreateDriver(), and CGBDataLoader_Native::x_CreateReaders().
Definition at line 184 of file dispatcher.cpp.
References m_Writers.
Referenced by CGBDataLoader_Native::x_CreateWriters().
void CReadDispatcher::LoadAccVers | ( | CReaderRequestResult & | result, |
const TIds & | ids, | ||
TLoaded & | loaded, | ||
TIds & | ret | ||
) |
Definition at line 1775 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetAccVers().
void CReadDispatcher::LoadBlob | ( | CReaderRequestResult & | result, |
const CBlob_id & | blob_id | ||
) |
Definition at line 1884 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetBlobById(), and CReader::LoadBlobs().
void CReadDispatcher::LoadBlob | ( | CReaderRequestResult & | result, |
const CBlob_Info & | blob_info | ||
) |
Definition at line 1892 of file dispatcher.cpp.
References command, CBlob_Info::GetBlob_id(), Process(), and result.
void CReadDispatcher::LoadBlobs | ( | CReaderRequestResult & | result, |
const CLoadLockBlobIds & | blobs, | ||
TContentsMask | mask, | ||
const SAnnotSelector * | sel | ||
) |
void CReadDispatcher::LoadBlobs | ( | CReaderRequestResult & | result, |
const CSeq_id_Handle & | seq_id, | ||
TContentsMask | mask, | ||
const SAnnotSelector * | sel | ||
) |
Definition at line 1864 of file dispatcher.cpp.
References command, mask, Process(), and result.
Referenced by CReader::LoadBlobs(), CReader::LoadSeq_idTaxId(), CReader::LoadSequenceLength(), CReader::LoadSequenceType(), and CGBDataLoader_Native::x_GetRecords().
void CReadDispatcher::LoadBlobSet | ( | CReaderRequestResult & | result, |
const TIds & | seq_ids | ||
) |
Definition at line 1917 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetBlobs().
void CReadDispatcher::LoadBlobState | ( | CReaderRequestResult & | result, |
const TBlobId & | blob_id | ||
) |
Definition at line 1849 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CReader::LoadStates().
void CReadDispatcher::LoadBlobVersion | ( | CReaderRequestResult & | result, |
const TBlobId & | blob_id, | ||
const CReader * | asking_reader = 0 |
||
) |
Definition at line 1856 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetBlobVersion(), and CCacheReader::LoadChunk().
void CReadDispatcher::LoadChunk | ( | CReaderRequestResult & | result, |
const TBlobId & | blob_id, | ||
TChunkId | chunk_id | ||
) |
Definition at line 1900 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetChunk().
void CReadDispatcher::LoadChunks | ( | CReaderRequestResult & | result, |
const TBlobId & | blob_id, | ||
const TChunkIds & | chunk_ids | ||
) |
Definition at line 1908 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetChunks().
void CReadDispatcher::LoadGis | ( | CReaderRequestResult & | result, |
const TIds & | ids, | ||
TLoaded & | loaded, | ||
TGis & | ret | ||
) |
Definition at line 1783 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetGis().
void CReadDispatcher::LoadHashes | ( | CReaderRequestResult & | result, |
const TIds & | ids, | ||
TLoaded & | loaded, | ||
THashes & | ret, | ||
TKnown & | known | ||
) |
Definition at line 1807 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetSequenceHashes().
void CReadDispatcher::LoadLabels | ( | CReaderRequestResult & | result, |
const TIds & | ids, | ||
TLoaded & | loaded, | ||
TLabels & | ret | ||
) |
Definition at line 1791 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetLabels().
void CReadDispatcher::LoadLengths | ( | CReaderRequestResult & | result, |
const TIds & | ids, | ||
TLoaded & | loaded, | ||
TLengths & | ret | ||
) |
Definition at line 1816 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetSequenceLengths().
void CReadDispatcher::LoadSeq_idAccVer | ( | CReaderRequestResult & | result, |
const CSeq_id_Handle & | seq_id | ||
) |
Definition at line 1727 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetAccVerFound(), and CReader::LoadAccVers().
void CReadDispatcher::LoadSeq_idBlob_ids | ( | CReaderRequestResult & | result, |
const CSeq_id_Handle & | seq_id, | ||
const SAnnotSelector * | sel | ||
) |
Definition at line 1840 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetBlobId(), CGBDataLoader_Native::GetNamedAnnotAccessions(), CId1Reader::LoadSeq_idBlob_ids(), CReader::LoadSeq_idBlob_ids(), and CReader::LoadStates().
void CReadDispatcher::LoadSeq_idGi | ( | CReaderRequestResult & | result, |
const CSeq_id_Handle & | seq_id | ||
) |
Definition at line 1719 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetGiFound(), CReader::LoadGis(), CId1Reader::LoadSeq_idBlob_ids(), CId1Reader::LoadSeq_idSeq_ids(), CPubseqReader::LoadSeq_idSeq_ids(), and CPubseqReader::LoadSequenceHash().
void CReadDispatcher::LoadSeq_idLabel | ( | CReaderRequestResult & | result, |
const CSeq_id_Handle & | seq_id | ||
) |
Definition at line 1735 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetLabel(), and CReader::LoadLabels().
void CReadDispatcher::LoadSeq_idSeq_ids | ( | CReaderRequestResult & | result, |
const CSeq_id_Handle & | seq_id | ||
) |
Definition at line 1711 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetIds(), CReader::LoadSeq_idAccVer(), CReader::LoadSeq_idGi(), CReader::LoadSeq_idLabel(), CId1Reader::LoadSeq_idSeq_ids(), CPubseqReader::LoadSeq_idSeq_ids(), and CReader::LoadSequenceHash().
void CReadDispatcher::LoadSeq_idTaxId | ( | CReaderRequestResult & | result, |
const CSeq_id_Handle & | seq_id | ||
) |
Definition at line 1743 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetTaxId(), and CReader::LoadTaxIds().
void CReadDispatcher::LoadSequenceHash | ( | CReaderRequestResult & | result, |
const CSeq_id_Handle & | seq_id | ||
) |
Definition at line 1751 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetSequenceHashFound(), CReader::LoadHashes(), and CPubseqReader::LoadSequenceHash().
void CReadDispatcher::LoadSequenceLength | ( | CReaderRequestResult & | result, |
const CSeq_id_Handle & | seq_id | ||
) |
Definition at line 1759 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetSequenceLength(), and CReader::LoadLengths().
void CReadDispatcher::LoadSequenceType | ( | CReaderRequestResult & | result, |
const CSeq_id_Handle & | seq_id | ||
) |
Definition at line 1767 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetSequenceTypeFound(), and CReader::LoadTypes().
void CReadDispatcher::LoadStates | ( | CReaderRequestResult & | result, |
const TIds & | ids, | ||
TLoaded & | loaded, | ||
TStates & | ret | ||
) |
Definition at line 1832 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetSequenceStates().
void CReadDispatcher::LoadTaxIds | ( | CReaderRequestResult & | result, |
const TIds & | ids, | ||
TLoaded & | loaded, | ||
TTaxIds & | ret | ||
) |
Definition at line 1799 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetTaxIds().
void CReadDispatcher::LoadTypes | ( | CReaderRequestResult & | result, |
const TIds & | ids, | ||
TLoaded & | loaded, | ||
TTypes & | ret | ||
) |
Definition at line 1824 of file dispatcher.cpp.
References command, Process(), and result.
Referenced by CGBDataLoader_Native::GetSequenceTypes().
|
static |
Definition at line 1969 of file dispatcher.cpp.
References CGBRequestStatistics::AddTime(), CSeq_id_Handle::AsString(), CollectStatistics(), command, CReaderRequestResultRecursion::GetCurrentRequestTime(), CReaderRequestResultRecursion::GetRecursionLevel(), LOG_POST_X, result, and sx_Statistics.
Referenced by CProcessor::LogStat(), and Process().
|
static |
Definition at line 1992 of file dispatcher.cpp.
References CGBRequestStatistics::AddTimeSize(), CSeq_id_Handle::AsString(), CollectStatistics(), command, CReaderRequestResultRecursion::GetCurrentRequestTime(), CReaderRequestResultRecursion::GetRecursionLevel(), LOG_POST_X, result, ncbi::grid::netcache::search::fields::size, and sx_Statistics.
void CReadDispatcher::Process | ( | CReadDispatcherCommand & | command, |
const CReader * | asking_reader = 0 |
||
) |
Definition at line 1618 of file dispatcher.cpp.
References CheckReaders(), command, CLoaderException::eNoConnection, CLoaderException::eRepeatAgain, CException::GetErrCode(), CReader::GetRetryCount(), Info(), kMax_Int, LOG_POST_X, LogStat(), m_Readers, CReader::MayBeSkippedOnErrors(), NCBI_THROW, NON_CONST_ITERATE, r(), s_AllowIncompleteCommands(), Warning(), and CException::what().
Referenced by LoadAccVers(), LoadBlob(), LoadBlobs(), LoadBlobSet(), LoadBlobState(), LoadBlobVersion(), LoadChunk(), LoadChunks(), LoadGis(), LoadHashes(), LoadLabels(), LoadLengths(), LoadSeq_idAccVer(), LoadSeq_idBlob_ids(), LoadSeq_idGi(), LoadSeq_idLabel(), LoadSeq_idSeq_ids(), LoadSeq_idTaxId(), LoadSequenceHash(), LoadSequenceLength(), LoadSequenceType(), LoadStates(), LoadTaxIds(), and LoadTypes().
void CReadDispatcher::ResetCaches | ( | void | ) |
Definition at line 250 of file dispatcher.cpp.
References m_Readers, m_Writers, and NON_CONST_ITERATE.
Referenced by CGBDataLoader_Native::CloseCache().
|
static |
Definition at line 1925 of file dispatcher.cpp.
References CannotProcess(), eAlreadyLoaded, fBlobHasCore, CLoadLockBlobIds::GetBlob_ids(), CLoadLockBlobState::GetBlobState(), CLoadLockSeqIds::GetState(), CLoadLockBlobIds::GetState(), i, CLoadLockSeqIds::IsFound(), CFixedBlob_ids::IsFound(), CLoadLockBlobState::IsLoadedBlobState(), ITERATE, CFixedBlob_ids::kUnknownState, and result.
Referenced by CId2ReaderBase::LoadStates(), and CReader::LoadStates().
|
private |
Definition at line 182 of file dispatcher.hpp.
Referenced by GetProcessor(), and InsertProcessor().
|
private |
Definition at line 180 of file dispatcher.hpp.
Referenced by CheckReaders(), HasReaderWithHUPIncluded(), InsertReader(), Process(), and ResetCaches().
|
private |
Definition at line 181 of file dispatcher.hpp.
Referenced by GetWriter(), InsertWriter(), and ResetCaches().