44 #define NCBI_USE_ERRCODE_X Objtools_Rd_Disp
99 : m_Action(action), m_Entity(entity),
100 m_Count(0), m_Time(0), m_Size(0)
108 "CGBRequestStatistics::GetStatistics: "
109 "invalid statistics type: "<<
type);
123 setiosflags(ios::fixed) <<
126 (time*1000/
count) <<
" ms/one)");
131 setiosflags(ios::fixed) <<
134 (time*1000/
count) <<
" ms/one)" <<
135 setprecision(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() ) {
253 rd->second->ResetCache();
256 wr->second->ResetCache();
307 return m_Lock.IsLoaded();
313 string GetErrMsg(
void)
const
315 return "LoadSeq_idSeq_ids("+m_Key.AsString()+
"): "
322 string GetStatisticsDescription(
void)
const
324 return "Seq-ids("+m_Key.AsString()+
")";
346 return m_Lock.IsLoadedGi();
352 string GetErrMsg(
void)
const
354 return "LoadSeq_idGi("+m_Key.AsString()+
"): "
361 string GetStatisticsDescription(
void)
const
363 return "gi("+m_Key.AsString()+
")";
385 return m_Lock.IsLoadedAccVer();
391 string GetErrMsg(
void)
const
393 return "LoadSeq_idAccVer("+m_Key.AsString()+
"): "
400 string GetStatisticsDescription(
void)
const
402 return "acc("+m_Key.AsString()+
")";
424 return m_Lock.IsLoadedLabel();
430 string GetErrMsg(
void)
const
432 return "LoadSeq_idLabel("+m_Key.AsString()+
"): "
439 string GetStatisticsDescription(
void)
const
441 return "label("+m_Key.AsString()+
")";
463 return m_Lock.IsLoadedTaxId();
469 bool MayBeSkipped(
void)
const
473 string GetErrMsg(
void)
const
475 return "LoadSeq_idTaxId("+m_Key.AsString()+
"): "
482 string GetStatisticsDescription(
void)
const
484 return "taxid("+m_Key.AsString()+
")";
506 return m_Lock.IsLoadedHash();
512 bool MayBeSkipped(
void)
const
516 string GetErrMsg(
void)
const
518 return "LoadSequenceHash("+m_Key.AsString()+
"): "
525 string GetStatisticsDescription(
void)
const
527 return "hash("+m_Key.AsString()+
")";
549 return m_Lock.IsLoadedLength();
555 bool MayBeSkipped(
void)
const
559 string GetErrMsg(
void)
const
561 return "LoadSequenceLength("+m_Key.AsString()+
"): "
568 string GetStatisticsDescription(
void)
const
570 return "length("+m_Key.AsString()+
")";
592 return m_Lock.IsLoadedType();
598 bool MayBeSkipped(
void)
const
602 string GetErrMsg(
void)
const
604 return "LoadSequenceType("+m_Key.AsString()+
"): "
611 string GetStatisticsDescription(
void)
const
613 return "type("+m_Key.AsString()+
")";
625 if ( ids.IsLoaded() ) {
630 if ( seq_ids && !seq_ids.GetData().IsFound() ) {
647 m_Key(
key), m_Selector(sel),
654 return s_Blob_idsLoaded(m_Lock, GetResult(), m_Key);
661 string GetErrMsg(
void)
const
663 return "LoadSeq_idBlob_ids("+m_Key.AsString()+
"): "
670 string GetStatisticsDescription(
void)
const
672 return "blob-ids("+m_Key.AsString()+
")";
681 template<
class CLoadLock>
682 bool sx_IsLoaded(
size_t i,
684 const vector<CSeq_id_Handle>& ids,
685 const vector<bool>& loaded)
690 CLoadLock lock(
result, ids[
i]);
691 if ( lock.
IsLoaded() && !lock.IsFound() ) {
697 template<
class CLoadLock>
699 const vector<CSeq_id_Handle>& ids,
700 const vector<bool>& loaded)
702 for (
size_t i = 0;
i < ids.size(); ++
i ) {
703 if ( sx_IsLoaded<CLoadLock>(
i,
result, ids, loaded) ) {
711 template<
class CLoadLock>
713 const vector<CSeq_id_Handle>& ids,
714 const vector<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() ) {
724 ret += ids[
i].AsString();
733 typedef vector<CSeq_id_Handle> TKey;
734 typedef vector<bool> TLoaded;
735 typedef vector<CSeq_id_Handle> TIds;
736 typedef vector<TIds> TRet;
739 const TKey&
key, TLoaded& loaded, TRet& ret)
741 m_Key(
key), m_Loaded(loaded), m_Ret(ret)
747 return reader.
LoadBulkIds(GetResult(), m_Key, m_Loaded, m_Ret);
751 return sx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
753 string GetErrMsg(
void)
const
755 return "LoadBulkIds("+
756 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
759 string GetStatisticsDescription(
void)
const
762 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
769 size_t GetStatisticsCount(
void)
const
783 typedef vector<CSeq_id_Handle> TKey;
784 typedef vector<bool> TLoaded;
785 typedef vector<CSeq_id_Handle> TRet;
788 const TKey&
key, TLoaded& loaded, TRet& ret)
790 m_Key(
key), m_Loaded(loaded), m_Ret(ret)
796 return reader.
LoadAccVers(GetResult(), m_Key, m_Loaded, m_Ret);
800 return sx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
802 string GetErrMsg(
void)
const
804 return "LoadAccVers("+
805 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
808 string GetStatisticsDescription(
void)
const
811 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
818 size_t GetStatisticsCount(
void)
const
832 typedef vector<CSeq_id_Handle> TKey;
833 typedef vector<bool> TLoaded;
834 typedef vector<TGi> TRet;
837 const TKey&
key, TLoaded& loaded, TRet& ret)
839 m_Key(
key), m_Loaded(loaded), m_Ret(ret)
845 return reader.
LoadGis(GetResult(), m_Key, m_Loaded, m_Ret);
849 return sx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
851 string GetErrMsg(
void)
const
854 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
857 string GetStatisticsDescription(
void)
const
860 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
867 size_t GetStatisticsCount(
void)
const
881 typedef vector<CSeq_id_Handle> TKey;
882 typedef vector<bool> TLoaded;
883 typedef vector<string> TRet;
886 const TKey&
key, TLoaded& loaded, TRet& ret)
888 m_Key(
key), m_Loaded(loaded), m_Ret(ret)
894 return reader.
LoadLabels(GetResult(), m_Key, m_Loaded, m_Ret);
898 return sx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
900 string GetErrMsg(
void)
const
902 return "LoadLabels("+
903 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
906 string GetStatisticsDescription(
void)
const
909 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
916 size_t GetStatisticsCount(
void)
const
930 typedef vector<CSeq_id_Handle> TKey;
931 typedef vector<bool> TLoaded;
932 typedef vector<TTaxId> TRet;
935 const TKey&
key, TLoaded& loaded, TRet& ret)
937 m_Key(
key), m_Loaded(loaded), m_Ret(ret)
943 return reader.
LoadTaxIds(GetResult(), m_Key, m_Loaded, m_Ret);
945 bool MayBeSkipped(
void)
const
951 return sx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
953 string GetErrMsg(
void)
const
955 return "LoadTaxIds("+
956 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
959 string GetStatisticsDescription(
void)
const
962 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
969 size_t GetStatisticsCount(
void)
const
983 typedef vector<CSeq_id_Handle> TKey;
984 typedef vector<bool> TLoaded;
985 typedef vector<bool> TKnown;
986 typedef vector<int> TRet;
989 const TKey&
key, TLoaded& loaded,
990 TRet& ret, TKnown& known)
992 m_Key(
key), m_Loaded(loaded), m_Ret(ret), m_Known(known)
998 return reader.
LoadHashes(GetResult(), m_Key, m_Loaded,
1001 bool MayBeSkipped(
void)
const
1007 return sx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
1009 string GetErrMsg(
void)
const
1011 return "LoadHashes("+
1012 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1013 "): data not found";
1015 string GetStatisticsDescription(
void)
const
1018 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1025 size_t GetStatisticsCount(
void)
const
1027 return m_Key.size();
1040 typedef vector<CSeq_id_Handle> TKey;
1041 typedef vector<bool> TLoaded;
1042 typedef vector<TSeqPos> TRet;
1045 const TKey&
key, TLoaded& loaded, TRet& ret)
1047 m_Key(
key), m_Loaded(loaded), m_Ret(ret)
1053 return reader.
LoadLengths(GetResult(), m_Key, m_Loaded, m_Ret);
1055 bool MayBeSkipped(
void)
const
1061 return sx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
1063 string GetErrMsg(
void)
const
1065 return "LoadLengths("+
1066 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1067 "): data not found";
1069 string GetStatisticsDescription(
void)
const
1072 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1079 size_t GetStatisticsCount(
void)
const
1081 return m_Key.size();
1093 typedef vector<CSeq_id_Handle> TKey;
1094 typedef vector<bool> TLoaded;
1095 typedef vector<CSeq_inst::EMol> TRet;
1098 const TKey&
key, TLoaded& loaded, TRet& ret)
1100 m_Key(
key), m_Loaded(loaded), m_Ret(ret)
1106 return reader.
LoadTypes(GetResult(), m_Key, m_Loaded, m_Ret);
1108 bool MayBeSkipped(
void)
const
1114 return sx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
1116 string GetErrMsg(
void)
const
1118 return "LoadTypes("+
1119 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1120 "): data not found";
1122 string GetStatisticsDescription(
void)
const
1125 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1132 size_t GetStatisticsCount(
void)
const
1134 return m_Key.size();
1146 typedef vector<CSeq_id_Handle> TKey;
1147 typedef vector<bool> TLoaded;
1148 typedef vector<int> TRet;
1151 const TKey&
key, TLoaded& loaded, TRet& ret)
1153 m_Key(
key), m_Loaded(loaded), m_Ret(ret)
1159 return reader.
LoadStates(GetResult(), m_Key, m_Loaded, m_Ret);
1163 return sx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
1165 string GetErrMsg(
void)
const
1167 return "LoadStates("+
1168 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1169 "): data not found";
1171 string GetStatisticsDescription(
void)
const
1174 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1181 size_t GetStatisticsCount(
void)
const
1183 return m_Key.size();
1192 static const size_t kMaxErrorSeqIds = 100;
1196 string ret =
"; seq-ids: { ";
1197 if (
result.GetRequestedId()) {
1198 ret +=
result.GetRequestedId().AsString();
1202 for (
auto key : keys) {
1208 for (
auto&
id : ids) {
1209 if (++total > kMaxErrorSeqIds)
continue;
1210 if (
cnt++ > 0) ret +=
", ";
1211 ret +=
id.AsString();
1215 if (total == 0)
return "";
1216 if (total > kMaxErrorSeqIds) {
1225 const vector<pair<
CBlob_id, vector<int>>>& keys)
1227 string ret =
"; seq-ids: { ";
1228 if (
result.GetRequestedId()) {
1229 ret +=
result.GetRequestedId().AsString();
1233 for (
auto&
key : keys ) {
1239 for (
auto&
id : ids) {
1240 if (++total > kMaxErrorSeqIds)
continue;
1241 if (
cnt++ > 0) ret +=
", ";
1242 ret +=
id.AsString();
1246 if (total == 0)
return "";
1247 if (total > kMaxErrorSeqIds) {
1269 return m_Lock.IsLoadedBlobState();
1275 string GetErrMsg(
void)
const
1277 return "LoadBlobVersion("+m_Key.ToString()+
")" +
1278 sx_ErrorSeqIds(GetResult(), {m_Key}) +
": data not found";
1284 string GetStatisticsDescription(
void)
const
1286 return "blob-version("+m_Key.ToString()+
")";
1308 return m_Lock.IsLoadedBlobVersion();
1314 string GetErrMsg(
void)
const
1316 return "LoadBlobVersion("+m_Key.ToString()+
")" +
1317 sx_ErrorSeqIds(GetResult(), {m_Key}) +
": "
1324 string GetStatisticsDescription(
void)
const
1326 return "blob-version("+m_Key.ToString()+
")";
1339 for (
auto&
info : infos ) {
1344 if ( !blob.IsLoadedBlob() ) {
1368 m_Ids(ids), m_Mask(
mask), m_Selector(sel)
1374 return s_AllBlobsAreLoaded(GetResult(),
1375 m_Ids, m_Mask, m_Selector);
1380 m_Ids, m_Mask, m_Selector);
1382 string GetErrMsg(
void)
const
1384 return "LoadBlobs(CLoadInfoBlob_ids): "
1391 string GetStatisticsDescription(
void)
const
1393 return "blobs(...)";
1413 m_Mask(
mask), m_Selector(sel)
1419 return s_Blob_idsLoaded(m_Ids, GetResult(), m_Key) &&
1420 s_AllBlobsAreLoaded(GetResult(),
1421 m_Ids, m_Mask, m_Selector);
1426 m_Key, m_Mask, m_Selector);
1428 string GetErrMsg(
void)
const
1430 return "LoadBlobs("+m_Key.AsString()+
"): "
1437 string GetStatisticsDescription(
void)
const
1439 return "blobs("+m_Key.AsString()+
")";
1462 return s_AllBlobsAreLoaded(GetResult(), m_Ids);
1466 return reader.
LoadBlobs(GetResult(), m_Ids);
1468 string GetErrMsg(
void)
const
1470 return "LoadBlobs(CLoadInfoBlob_ids): "
1477 string GetStatisticsDescription(
void)
const
1479 return "blobs(...)";
1497 m_BlobInfo(blob_info)
1503 return m_Lock.IsLoadedBlob();
1508 return reader.
LoadBlob(GetResult(), *m_BlobInfo);
1511 return reader.
LoadBlob(GetResult(), m_Key);
1514 string GetErrMsg(
void)
const
1516 return "LoadBlob("+m_Key.ToString()+
")" +
1517 sx_ErrorSeqIds(GetResult(), {m_Key}) +
": "
1524 string GetStatisticsDescription(
void)
const
1526 return "blob("+m_Key.ToString()+
")";
1552 return m_Lock.IsLoadedChunk();
1556 return reader.
LoadChunk(GetResult(), m_Key, m_ChunkId);
1558 string GetErrMsg(
void)
const
1560 return "LoadChunk("+m_Key.ToString()+
", "+
1562 sx_ErrorSeqIds(GetResult(), {m_Key}) +
": "
1569 string GetStatisticsDescription(
void)
const
1571 return "chunk("+m_Key.ToString()+
"."+
1587 typedef vector<TChunkId> TChunkIds;
1590 const TChunkIds chunk_ids)
1593 m_ChunkIds(chunk_ids)
1599 ITERATE ( TChunkIds, it, m_ChunkIds ) {
1600 if ( !m_Lock.IsLoadedChunk(*it) ) {
1608 return reader.
LoadChunks(GetResult(), m_Key, m_ChunkIds);
1610 string GetErrMsg(
void)
const
1613 str <<
"LoadChunks(" << m_Key.ToString() <<
"; chunks: {";
1615 ITERATE ( TChunkIds, it, m_ChunkIds ) {
1616 if ( !m_Lock.IsLoadedChunk(*it) ) {
1621 str <<
" })" + sx_ErrorSeqIds(GetResult(), {m_Key}) +
": data not found";
1628 string GetStatisticsDescription(
void)
const
1632 ITERATE ( TChunkIds, it, m_ChunkIds ) {
1636 str <<
"chunk(" << m_Key.ToString() <<
'.';
1646 str <<
"blob(" << m_Key.ToString();
1655 TChunkIds m_ChunkIds;
1662 typedef vector<TChunkId> TChunkIds;
1663 typedef vector<pair<CBlob_id, TChunkIds>> TKey;
1664 typedef vector<CLoadLockBlob> TLock;
1670 for (
auto& blob :
key ) {
1677 for (
size_t i = 0;
i < m_Key.size(); ++
i ) {
1678 for (
auto chunk : m_Key[
i].second ) {
1679 if ( !m_Lock[
i].IsLoadedChunk(chunk) ) {
1688 return reader.
LoadChunks(GetResult(), m_Key);
1690 string GetErrMsg(
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 string GetStatisticsDescription(
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 const TIds& seq_ids)
1775 if ( !s_Blob_idsLoaded(blob_ids,
result, *
id) ) {
1784 if ( !blob.IsLoadedBlob() ) {
1795 string GetErrMsg(
void)
const
1797 return "LoadBlobSet(" +
1805 string GetStatisticsDescription(
void)
const
1849 if ( asking_reader ) {
1851 if ( rdr->second == asking_reader ) {
1857 CReader& reader = *rdr->second;
1858 command.GetResult().SetLevel(rdr->first);
1859 int retry_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() &&
2039 CCommandLoadHashes
command(
result, ids, loaded, ret, known);
2162 const TIds& seq_ids)
2178 if ( lock.IsLoaded() ) {
2204 if ( ids_lock && !ids_lock.GetData().
IsFound() ) {
2222 string descr =
command.GetStatisticsDescription();
2225 descr = descr +
" for " + idh.
AsString();
2228 "Dispatcher: read " <<
2230 setiosflags(ios::fixed) <<
2231 setprecision(3) << (time*1000) <<
" ms");
2245 string descr =
command.GetStatisticsDescription();
2248 descr = descr +
" for " + idh.
AsString();
2252 setiosflags(ios::fixed) <<
2254 (time*1000) <<
" ms (" <<
2256 (
size/1024.0) <<
" kB " <<
2258 (
size/time/1024) <<
" kB/s)");
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