: m_Action(action), m_Entity(entity),
100m_Count(0), m_Time(0), m_Size(0)
108 "CGBRequestStatistics::GetStatistics: " 109 "invalid statistics type: "<<
type);
123setiosflags(ios::fixed) <<
126(time*1000/
count) <<
" ms/one)");
131setiosflags(ios::fixed) <<
134(time*1000/
count) <<
" ms/one)"<<
135setprecision(2) <<
" ("<<
136(
size/1024.0) <<
" kB "<<
137(
size/time/1024) <<
" kB/s)");
208 if(
i->first >=
result.GetLevel() ) {
211 if(
i->second->CanWrite(
type) ) {
212 return const_cast<CWriter*
>(
i->second.GetPointer());
224 "CReadDispatcher::GetProcessor: " 225 "processor unknown: "<<
type);
227 return*iter->second;
242 if( rd.second->HasHUPIncluded() ) {
253rd->second->ResetCache();
256wr->second->ResetCache();
307 returnm_Lock.IsLoaded();
313 stringGetErrMsg(
void)
const 315 return "LoadSeq_idSeq_ids("+m_Key.AsString()+
"): " 322 stringGetStatisticsDescription(
void)
const 324 return "Seq-ids("+m_Key.AsString()+
")";
346 returnm_Lock.IsLoadedGi();
352 stringGetErrMsg(
void)
const 354 return "LoadSeq_idGi("+m_Key.AsString()+
"): " 361 stringGetStatisticsDescription(
void)
const 363 return "gi("+m_Key.AsString()+
")";
385 returnm_Lock.IsLoadedAccVer();
391 stringGetErrMsg(
void)
const 393 return "LoadSeq_idAccVer("+m_Key.AsString()+
"): " 400 stringGetStatisticsDescription(
void)
const 402 return "acc("+m_Key.AsString()+
")";
424 returnm_Lock.IsLoadedLabel();
430 stringGetErrMsg(
void)
const 432 return "LoadSeq_idLabel("+m_Key.AsString()+
"): " 439 stringGetStatisticsDescription(
void)
const 441 return "label("+m_Key.AsString()+
")";
463 returnm_Lock.IsLoadedTaxId();
469 boolMayBeSkipped(
void)
const 473 stringGetErrMsg(
void)
const 475 return "LoadSeq_idTaxId("+m_Key.AsString()+
"): " 482 stringGetStatisticsDescription(
void)
const 484 return "taxid("+m_Key.AsString()+
")";
506 returnm_Lock.IsLoadedHash();
512 boolMayBeSkipped(
void)
const 516 stringGetErrMsg(
void)
const 518 return "LoadSequenceHash("+m_Key.AsString()+
"): " 525 stringGetStatisticsDescription(
void)
const 527 return "hash("+m_Key.AsString()+
")";
549 returnm_Lock.IsLoadedLength();
555 boolMayBeSkipped(
void)
const 559 stringGetErrMsg(
void)
const 561 return "LoadSequenceLength("+m_Key.AsString()+
"): " 568 stringGetStatisticsDescription(
void)
const 570 return "length("+m_Key.AsString()+
")";
592 returnm_Lock.IsLoadedType();
598 boolMayBeSkipped(
void)
const 602 stringGetErrMsg(
void)
const 604 return "LoadSequenceType("+m_Key.AsString()+
"): " 611 stringGetStatisticsDescription(
void)
const 613 return "type("+m_Key.AsString()+
")";
625 if( ids.IsLoaded() ) {
630 if( seq_ids && !seq_ids.GetData().IsFound() ) {
647m_Key(
key), m_Selector(sel),
654 returns_Blob_idsLoaded(m_Lock, GetResult(), m_Key);
661 stringGetErrMsg(
void)
const 663 return "LoadSeq_idBlob_ids("+m_Key.AsString()+
"): " 670 stringGetStatisticsDescription(
void)
const 672 return "blob-ids("+m_Key.AsString()+
")";
681 template<
classCLoadLock>
682 boolsx_IsLoaded(
size_t i,
684 constvector<CSeq_id_Handle>& ids,
685 constvector<bool>& loaded)
690CLoadLock lock(
result, ids[
i]);
691 if( lock.
IsLoaded() && !lock.IsFound() ) {
697 template<
classCLoadLock>
699 constvector<CSeq_id_Handle>& ids,
700 constvector<bool>& loaded)
702 for(
size_t i= 0;
i< ids.size(); ++
i) {
703 if( sx_IsLoaded<CLoadLock>(
i,
result, ids, loaded) ) {
711 template<
classCLoadLock>
713 constvector<CSeq_id_Handle>& ids,
714 constvector<bool>& loaded)
717 for(
size_t i= 0;
i< ids.size(); ++
i) {
718 if( sx_IsLoaded<CLoadLock>(
i,
result, ids, loaded) ) {
721 if( !ret.empty() ) {
724ret += ids[
i].AsString();
733 typedefvector<CSeq_id_Handle> TKey;
734 typedefvector<bool> TLoaded;
735 typedefvector<CSeq_id_Handle> TIds;
736 typedefvector<TIds> TRet;
739 constTKey&
key, TLoaded& loaded, TRet& ret)
741m_Key(
key), m_Loaded(loaded), m_Ret(ret)
747 returnreader.
LoadBulkIds(GetResult(), m_Key, m_Loaded, m_Ret);
751 returnsx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
753 stringGetErrMsg(
void)
const 755 return "LoadBulkIds("+
756sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
757 "): data not found";
759 stringGetStatisticsDescription(
void)
const 762sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
769 size_tGetStatisticsCount(
void)
const 783 typedefvector<CSeq_id_Handle> TKey;
784 typedefvector<bool> TLoaded;
785 typedefvector<CSeq_id_Handle> TRet;
788 constTKey&
key, TLoaded& loaded, TRet& ret)
790m_Key(
key), m_Loaded(loaded), m_Ret(ret)
796 returnreader.
LoadAccVers(GetResult(), m_Key, m_Loaded, m_Ret);
800 returnsx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
802 stringGetErrMsg(
void)
const 804 return "LoadAccVers("+
805sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
806 "): data not found";
808 stringGetStatisticsDescription(
void)
const 811sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
818 size_tGetStatisticsCount(
void)
const 832 typedefvector<CSeq_id_Handle> TKey;
833 typedefvector<bool> TLoaded;
834 typedefvector<TGi> TRet;
837 constTKey&
key, TLoaded& loaded, TRet& ret)
839m_Key(
key), m_Loaded(loaded), m_Ret(ret)
845 returnreader.
LoadGis(GetResult(), m_Key, m_Loaded, m_Ret);
849 returnsx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
851 stringGetErrMsg(
void)
const 854sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
855 "): data not found";
857 stringGetStatisticsDescription(
void)
const 860sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
867 size_tGetStatisticsCount(
void)
const 881 typedefvector<CSeq_id_Handle> TKey;
882 typedefvector<bool> TLoaded;
883 typedefvector<string> TRet;
886 constTKey&
key, TLoaded& loaded, TRet& ret)
888m_Key(
key), m_Loaded(loaded), m_Ret(ret)
894 returnreader.
LoadLabels(GetResult(), m_Key, m_Loaded, m_Ret);
898 returnsx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
900 stringGetErrMsg(
void)
const 902 return "LoadLabels("+
903sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
904 "): data not found";
906 stringGetStatisticsDescription(
void)
const 909sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
916 size_tGetStatisticsCount(
void)
const 930 typedefvector<CSeq_id_Handle> TKey;
931 typedefvector<bool> TLoaded;
932 typedefvector<TTaxId> TRet;
935 constTKey&
key, TLoaded& loaded, TRet& ret)
937m_Key(
key), m_Loaded(loaded), m_Ret(ret)
943 returnreader.
LoadTaxIds(GetResult(), m_Key, m_Loaded, m_Ret);
945 boolMayBeSkipped(
void)
const 951 returnsx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
953 stringGetErrMsg(
void)
const 955 return "LoadTaxIds("+
956sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
957 "): data not found";
959 stringGetStatisticsDescription(
void)
const 962sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
969 size_tGetStatisticsCount(
void)
const 983 typedefvector<CSeq_id_Handle> TKey;
984 typedefvector<bool> TLoaded;
985 typedefvector<bool> TKnown;
986 typedefvector<int> TRet;
989 constTKey&
key, TLoaded& loaded,
990TRet& ret, TKnown& known)
992m_Key(
key), m_Loaded(loaded), m_Ret(ret), m_Known(known)
998 returnreader.
LoadHashes(GetResult(), m_Key, m_Loaded,
1001 boolMayBeSkipped(
void)
const 1007 returnsx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
1009 stringGetErrMsg(
void)
const 1011 return "LoadHashes("+
1012sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1013 "): data not found";
1015 stringGetStatisticsDescription(
void)
const 1018sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1025 size_tGetStatisticsCount(
void)
const 1027 returnm_Key.size();
1040 typedefvector<CSeq_id_Handle> TKey;
1041 typedefvector<bool> TLoaded;
1042 typedefvector<TSeqPos> TRet;
1045 constTKey&
key, TLoaded& loaded, TRet& ret)
1047m_Key(
key), m_Loaded(loaded), m_Ret(ret)
1053 returnreader.
LoadLengths(GetResult(), m_Key, m_Loaded, m_Ret);
1055 boolMayBeSkipped(
void)
const 1061 returnsx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
1063 stringGetErrMsg(
void)
const 1065 return "LoadLengths("+
1066sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1067 "): data not found";
1069 stringGetStatisticsDescription(
void)
const 1072sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1079 size_tGetStatisticsCount(
void)
const 1081 returnm_Key.size();
1093 typedefvector<CSeq_id_Handle> TKey;
1094 typedefvector<bool> TLoaded;
1095 typedefvector<CSeq_inst::EMol> TRet;
1098 constTKey&
key, TLoaded& loaded, TRet& ret)
1100m_Key(
key), m_Loaded(loaded), m_Ret(ret)
1106 returnreader.
LoadTypes(GetResult(), m_Key, m_Loaded, m_Ret);
1108 boolMayBeSkipped(
void)
const 1114 returnsx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
1116 stringGetErrMsg(
void)
const 1118 return "LoadTypes("+
1119sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1120 "): data not found";
1122 stringGetStatisticsDescription(
void)
const 1125sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1132 size_tGetStatisticsCount(
void)
const 1134 returnm_Key.size();
1146 typedefvector<CSeq_id_Handle> TKey;
1147 typedefvector<bool> TLoaded;
1148 typedefvector<int> TRet;
1151 constTKey&
key, TLoaded& loaded, TRet& ret)
1153m_Key(
key), m_Loaded(loaded), m_Ret(ret)
1159 returnreader.
LoadStates(GetResult(), m_Key, m_Loaded, m_Ret);
1163 returnsx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
1165 stringGetErrMsg(
void)
const 1167 return "LoadStates("+
1168sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1169 "): data not found";
1171 stringGetStatisticsDescription(
void)
const 1174sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1181 size_tGetStatisticsCount(
void)
const 1183 returnm_Key.size();
1192 static const size_tkMaxErrorSeqIds = 100;
1196 stringret =
"; seq-ids: { ";
1197 if(
result.GetRequestedId()) {
1198ret +=
result.GetRequestedId().AsString();
1202 for(
auto key: keys) {
1208 for(
auto&
id: ids) {
1209 if(++total > kMaxErrorSeqIds)
continue;
1210 if(
cnt++ > 0) ret +=
", ";
1211ret +=
id.AsString();
1215 if(total == 0)
return "";
1216 if(total > kMaxErrorSeqIds) {
1225 constvector<pair<
CBlob_id, vector<int>>>& keys)
1227 stringret =
"; seq-ids: { ";
1228 if(
result.GetRequestedId()) {
1229ret +=
result.GetRequestedId().AsString();
1233 for(
auto&
key: keys ) {
1239 for(
auto&
id: ids) {
1240 if(++total > kMaxErrorSeqIds)
continue;
1241 if(
cnt++ > 0) ret +=
", ";
1242ret +=
id.AsString();
1246 if(total == 0)
return "";
1247 if(total > kMaxErrorSeqIds) {
1269 returnm_Lock.IsLoadedBlobState();
1275 stringGetErrMsg(
void)
const 1277 return "LoadBlobVersion("+m_Key.ToString()+
")"+
1278sx_ErrorSeqIds(GetResult(), {m_Key}) +
": data not found";
1284 stringGetStatisticsDescription(
void)
const 1286 return "blob-version("+m_Key.ToString()+
")";
1308 returnm_Lock.IsLoadedBlobVersion();
1314 stringGetErrMsg(
void)
const 1316 return "LoadBlobVersion("+m_Key.ToString()+
")"+
1317sx_ErrorSeqIds(GetResult(), {m_Key}) +
": " 1324 stringGetStatisticsDescription(
void)
const 1326 return "blob-version("+m_Key.ToString()+
")";
1339 for(
auto&
info: infos ) {
1340 if( !
info.Matches(
mask, sel) ) {
1344 if( !blob.IsLoadedBlob() ) {
1368m_Ids(ids), m_Mask(
mask), m_Selector(sel)
1374 returns_AllBlobsAreLoaded(GetResult(),
1375m_Ids, m_Mask, m_Selector);
1380m_Ids, m_Mask, m_Selector);
1382 stringGetErrMsg(
void)
const 1384 return "LoadBlobs(CLoadInfoBlob_ids): " 1391 stringGetStatisticsDescription(
void)
const 1393 return "blobs(...)";
1409 constTKey&
key, TMask
mask,
1413m_Mask(
mask), m_Selector(sel)
1419 returns_Blob_idsLoaded(m_Ids, GetResult(), m_Key) &&
1420s_AllBlobsAreLoaded(GetResult(),
1421m_Ids, m_Mask, m_Selector);
1426m_Key, m_Mask, m_Selector);
1428 stringGetErrMsg(
void)
const 1430 return "LoadBlobs("+m_Key.AsString()+
"): " 1437 stringGetStatisticsDescription(
void)
const 1439 return "blobs("+m_Key.AsString()+
")";
1462 returns_AllBlobsAreLoaded(GetResult(), m_Ids);
1466 returnreader.
LoadBlobs(GetResult(), m_Ids);
1468 stringGetErrMsg(
void)
const 1470 return "LoadBlobs(CLoadInfoBlob_ids): " 1477 stringGetStatisticsDescription(
void)
const 1479 return "blobs(...)";
1497m_BlobInfo(blob_info)
1503 returnm_Lock.IsLoadedBlob();
1508 returnreader.
LoadBlob(GetResult(), *m_BlobInfo);
1511 returnreader.
LoadBlob(GetResult(), m_Key);
1514 stringGetErrMsg(
void)
const 1516 return "LoadBlob("+m_Key.ToString()+
")"+
1517sx_ErrorSeqIds(GetResult(), {m_Key}) +
": " 1524 stringGetStatisticsDescription(
void)
const 1526 return "blob("+m_Key.ToString()+
")";
1552 returnm_Lock.IsLoadedChunk();
1556 returnreader.
LoadChunk(GetResult(), m_Key, m_ChunkId);
1558 stringGetErrMsg(
void)
const 1560 return "LoadChunk("+m_Key.ToString()+
", "+
1562sx_ErrorSeqIds(GetResult(), {m_Key}) +
": " 1569 stringGetStatisticsDescription(
void)
const 1571 return "chunk("+m_Key.ToString()+
"."+
1587 typedefvector<TChunkId> TChunkIds;
1590 constTChunkIds chunk_ids)
1593m_ChunkIds(chunk_ids)
1599 ITERATE( TChunkIds, it, m_ChunkIds ) {
1600 if( !m_Lock.IsLoadedChunk(*it) ) {
1608 returnreader.
LoadChunks(GetResult(), m_Key, m_ChunkIds);
1610 stringGetErrMsg(
void)
const 1613 str<<
"LoadChunks("<< m_Key.ToString() <<
"; chunks: {";
1615 ITERATE( TChunkIds, it, m_ChunkIds ) {
1616 if( !m_Lock.IsLoadedChunk(*it) ) {
1617 if(
cnt++ )
str<<
',';
1621 str<<
" })"+ sx_ErrorSeqIds(GetResult(), {m_Key}) +
": data not found";
1628 stringGetStatisticsDescription(
void)
const 1632 ITERATE( TChunkIds, it, m_ChunkIds ) {
1636 str<<
"chunk("<< m_Key.ToString() <<
'.';
1646 str<<
"blob("<< m_Key.ToString();
1655TChunkIds m_ChunkIds;
1662 typedefvector<TChunkId> TChunkIds;
1663 typedefvector<pair<CBlob_id, TChunkIds>> TKey;
1664 typedefvector<CLoadLockBlob> TLock;
1670 for(
auto& blob :
key) {
1677 for(
size_t i= 0;
i< m_Key.size(); ++
i) {
1678 for(
autochunk : m_Key[
i].second ) {
1679 if( !m_Lock[
i].IsLoadedChunk(chunk) ) {
1688 returnreader.
LoadChunks(GetResult(), m_Key);
1690 stringGetErrMsg(
void)
const 1693 str<<
"LoadChunks(";
1695 for(
size_t i= 0;
i< m_Key.size(); ++
i) {
1697 for(
auto& chunk : m_Key[
i].second ) {
1698 if( !m_Lock[
i].IsLoadedChunk(chunk) ) {
1699 if( chunk_cnt++ ) {
1706 str<<
"("<<m_Key[
i].first.ToString() <<
"; chunks: {";
1708 str<<
' '<< chunk;
1715 str<< sx_ErrorSeqIds(GetResult(), m_Key) +
": data not found";
1722 stringGetStatisticsDescription(
void)
const 1726 for(
auto& blob : m_Key ) {
1731 for(
auto id: blob.second ) {
1734 str<<
"chunk("<< blob.first.ToString() <<
'.';
1744 str<<
"blob("<< blob.first.ToString();
1761 constTIds& seq_ids)
1775 if( !s_Blob_idsLoaded(blob_ids,
result, *
id) ) {
1784 if( !blob.IsLoadedBlob() ) {
1795 stringGetErrMsg(
void)
const 1797 return "LoadBlobSet("+
1805 stringGetStatisticsDescription(
void)
const 1839 const CReader* asking_reader)
1849 if( asking_reader ) {
1851 if( rdr->second == asking_reader ) {
1857 CReader& reader = *rdr->second;
1858 command.GetResult().SetLevel(rdr->first);
1859 intretry_count = 0;
1865 if( !
command.Execute(reader) ) {
1875 "CReadDispatcher: connection reopened " 1876 "due to inactivity timeout");
1880 "CReadDispatcher: Exception: "<<exc);
1884 if( retry_count >= max_retry_count &&
1890 "CReadDispatcher: Exception: "<<exc);
1895 if( retry_count >= max_retry_count &&
1901 "CReadDispatcher: Exception: "<<exc);
1903 catch( exception& exc ) {
1905 if( retry_count >= max_retry_count &&
1911 "CReadDispatcher: Exception: "<<exc.
what());
1916}
while( retry_count < max_retry_count );
1917 if( !
command.MayBeSkipped() &&
1924 if( !
command.MayBeSkipped() &&
2039CCommandLoadHashes
command(
result, ids, loaded, ret, known);
2086 const CReader* asking_reader)
2162 const TIds& seq_ids)
2178 if( lock.IsLoaded() ) {
2180 if( !blob_ids.
IsFound() ) {
2195loaded[
i] =
true;
2204 if( ids_lock && !ids_lock.GetData().
IsFound() ) {
2222 stringdescr =
command.GetStatisticsDescription();
2225descr = descr +
" for "+ idh.
AsString();
2228 "Dispatcher: read "<<
2230setiosflags(ios::fixed) <<
2231setprecision(3) << (time*1000) <<
" ms");
2245 stringdescr =
command.GetStatisticsDescription();
2248descr = descr +
" for "+ idh.
AsString();
2252setiosflags(ios::fixed) <<
2254(time*1000) <<
" ms ("<<
2256(
size/1024.0) <<
" kB "<<
2258(
size/time/1024) <<
" kB/s)");
ncbi::TMaskedQueryRegions mask
const CConstRef< CBlob_id > & GetBlob_id(void) const
static const CGBRequestStatistics & GetStatistics(EStatType type)
double GetSize(void) const
void AddTimeSize(double time, double size)
const char * GetEntity(void) const
static void PrintStatistics(void)
void PrintStat(void) const
CGBRequestStatistics(const char *action, const char *entity)
const char * GetAction(void) const
double GetTime(void) const
size_t GetCount(void) const
void AddTime(double time, size_t count=1)
bool SetNoBlob_ids(const CFixedBlob_ids::TState &state, TExpirationTime expiration_time)
TData GetBlob_ids(void) const
TData::TState GetState(void) const
TData GetBlobState(void) const
bool IsLoadedBlobState(void) const
static bool IsFound(const TData &data)
TData::TState GetState(void) const
Data loader exceptions, used by GenBank loader.
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
static void RegisterAllProcessors(CReadDispatcher &dispatcher)
virtual EType GetType(void) const =0
CReadDispatcherCommand(CReaderRequestResult &result)
virtual bool MayBeSkipped(void) const
virtual size_t GetStatisticsCount(void) const
CReaderRequestResult & GetResult(void) const
virtual ~CReadDispatcherCommand(void)
void LoadStates(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TStates &ret)
void CheckReaders(void) const
void LoadBlobSet(CReaderRequestResult &result, const TIds &seq_ids)
void LoadChunks(CReaderRequestResult &result, const TBlobId &blob_id, const TChunkIds &chunk_ids)
void LoadSeq_idLabel(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
CReader::TChunkId TChunkId
void LoadGis(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TGis &ret)
CReader::TContentsMask TContentsMask
static void LogStat(CReadDispatcherCommand &command, CReaderRequestResultRecursion &recursion)
void LoadBlobVersion(CReaderRequestResult &result, const TBlobId &blob_id, const CReader *asking_reader=0)
void InsertReader(TLevel level, CRef< CReader > reader)
void LoadBulkIds(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TBulkIds &ret)
const CProcessor & GetProcessor(CProcessor::EType type) const
CReader::TChunkIds TChunkIds
void LoadLabels(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TLabels &ret)
void LoadSeq_idGi(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void InsertWriter(TLevel level, CRef< CWriter > writer)
static bool SetBlobState(size_t i, CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TStates &ret)
void LoadSequenceType(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void LoadAccVers(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TIds &ret)
void LoadSequenceHash(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void LoadLengths(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TLengths &ret)
vector< TBlobState > TStates
vector< pair< CBlob_id, TChunkIds > > TBlobChunkIds
void LoadTaxIds(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TTaxIds &ret)
void LoadHashes(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, THashes &ret, TKnown &known)
bool HasReaderWithHUPIncluded() const
void LoadBlobState(CReaderRequestResult &result, const TBlobId &blob_id)
void LoadTypes(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TTypes &ret)
void LoadSeq_idTaxId(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
vector< CBlob_Info > TBlobInfos
void LoadSeq_idSeq_ids(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
vector< CSeq_id_Handle > TIds
vector< CSeq_inst::EMol > TTypes
void InsertProcessor(CRef< CProcessor > processor)
void LoadBlobs(CReaderRequestResult &result, const CSeq_id_Handle &seq_id, TContentsMask mask, const SAnnotSelector *sel)
CWriter * GetWriter(const CReaderRequestResult &result, CWriter::EType type) const
void LoadSeq_idAccVer(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void Process(CReadDispatcherCommand &command, const CReader *asking_reader=0)
static int CollectStatistics(void)
void LoadSequenceLength(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void LoadSeq_idBlob_ids(CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const SAnnotSelector *sel)
void LoadChunk(CReaderRequestResult &result, const TBlobId &blob_id, TChunkId chunk_id)
vector< TSeqPos > TLengths
void LoadBlob(CReaderRequestResult &result, const CBlob_id &blob_id)
static bool CannotProcess(const CSeq_id_Handle &sih)
double GetCurrentRequestTime(void) const
int GetRecursionLevel(void) const
void SetLevel(TLevel level)
virtual bool LoadSeq_idSeq_ids(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)=0
virtual int GetRetryCount(void) const
virtual bool LoadBlobSet(CReaderRequestResult &result, const TSeqIds &seq_ids)
virtual bool LoadHashes(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, THashes &ret, TKnown &known)
CReadDispatcher * m_Dispatcher
virtual bool LoadStates(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TStates &ret)
virtual bool LoadSequenceHash(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
virtual bool LoadSeq_idTaxId(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
virtual bool LoadLabels(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TLabels &ret)
virtual bool LoadTypes(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TTypes &ret)
virtual bool MayBeSkippedOnErrors(void) const
vector< CBlob_Info > TBlobIds
virtual bool LoadTaxIds(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TTaxIds &ret)
virtual bool LoadSequenceType(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
virtual bool LoadBlob(CReaderRequestResult &result, const CBlob_id &blob_id)=0
virtual bool LoadBulkIds(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TBulkIds &ret)
virtual bool LoadSequenceLength(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
virtual bool LoadChunks(CReaderRequestResult &result, const TBlobId &blob_id, const TChunkIds &chunk_ids)
virtual bool LoadGis(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TGis &ret)
virtual bool LoadAccVers(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TIds &ret)
virtual bool LoadSeq_idGi(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
virtual bool LoadSeq_idAccVer(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
virtual bool LoadBlobState(CReaderRequestResult &result, const TBlobId &blob_id)=0
virtual bool LoadChunk(CReaderRequestResult &result, const TBlobId &blob_id, TChunkId chunk_id)
virtual bool LoadLengths(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TLengths &ret)
virtual bool LoadBlobVersion(CReaderRequestResult &result, const TBlobId &blob_id)=0
virtual bool LoadSeq_idBlob_ids(CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const SAnnotSelector *sel)
All LoadXxx() methods should return false if there is no requested data in the reader.
virtual bool LoadBlobs(CReaderRequestResult &result, const CSeq_id_Handle &seq_id, TContentsMask mask, const SAnnotSelector *sel)
virtual bool LoadSeq_idLabel(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
virtual void GetBioseqsIds(TSeqIds &ids) const
vector< CSeq_id_Handle > TSeqIds
bool IsLoaded(void) const
container_type::const_iterator const_iterator
const_iterator end() const
const_iterator find(const key_type &key) const
static bool s_AllowIncompleteCommands(void)
static CGBRequestStatistics sx_Statistics[CGBRequestStatistics::eStats_Count]
NCBI_PARAM_DEF_EX(bool, GENBANK, ALLOW_INCOMPLETE_COMMANDS, false, eParam_NoThread, GENBANK_ALLOW_INCOMPLETE_COMMANDS)
NCBI_PARAM_DECL(bool, GENBANK, ALLOW_INCOMPLETE_COMMANDS)
NCBI_DEFINE_ERR_SUBCODE_X(10)
static const char * str(char *buf, int n)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
#define LOG_POST_X(err_subcode, message)
TErrCode GetErrCode(void) const
Get error code.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
void Warning(CExceptionArgs_Base &args)
#define NCBI_THROW_FMT(exception_class, err_code, message)
The same as NCBI_THROW but with message processed as output to ostream.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
void Info(CExceptionArgs_Base &args)
CConstRef< CSeq_id > GetSeqId(void) const
string AsString(void) const
CSeq_id::E_Choice Which(void) const
#define NCBI_PARAM_TYPE(section, name)
Generate typename for a parameter from its {section, name} attributes.
@ eParam_NoThread
Do not use per-thread values.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
static string SizetToString(size_t value, TNumToStringFlags flags=0, int base=10)
Convert size_t to string.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
const TDb & GetDb(void) const
Get the Db member data.
const TGeneral & GetGeneral(void) const
Get the variant data.
@ e_General
for other databases
string Execute(const string &cmmd, const vector< string > &args, const string &data=kEmptyStr)
const struct ncbi::grid::netcache::search::fields::SIZE size
const struct ncbi::grid::netcache::search::fields::KEY key
string s_Value(TValue value)
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
CReadDispatcherCommand & m_Command
SSaveResultLevel(CReadDispatcherCommand &command)
CReadDispatcher::TLevel m_SavedLevel
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4