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> TRet;
738 const TKey&
key, TLoaded& loaded, TRet& ret)
740 m_Key(
key), m_Loaded(loaded), m_Ret(ret)
746 return reader.
LoadAccVers(GetResult(), m_Key, m_Loaded, m_Ret);
750 return sx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
752 string GetErrMsg(
void)
const
754 return "LoadAccVers("+
755 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
758 string GetStatisticsDescription(
void)
const
761 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
768 size_t GetStatisticsCount(
void)
const
782 typedef vector<CSeq_id_Handle> TKey;
783 typedef vector<bool> TLoaded;
784 typedef vector<TGi> TRet;
787 const TKey&
key, TLoaded& loaded, TRet& ret)
789 m_Key(
key), m_Loaded(loaded), m_Ret(ret)
795 return reader.
LoadGis(GetResult(), m_Key, m_Loaded, m_Ret);
799 return sx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
801 string GetErrMsg(
void)
const
804 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
807 string GetStatisticsDescription(
void)
const
810 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
817 size_t GetStatisticsCount(
void)
const
831 typedef vector<CSeq_id_Handle> TKey;
832 typedef vector<bool> TLoaded;
833 typedef vector<string> TRet;
836 const TKey&
key, TLoaded& loaded, TRet& ret)
838 m_Key(
key), m_Loaded(loaded), m_Ret(ret)
844 return reader.
LoadLabels(GetResult(), m_Key, m_Loaded, m_Ret);
848 return sx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
850 string GetErrMsg(
void)
const
852 return "LoadLabels("+
853 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
856 string GetStatisticsDescription(
void)
const
859 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
866 size_t GetStatisticsCount(
void)
const
880 typedef vector<CSeq_id_Handle> TKey;
881 typedef vector<bool> TLoaded;
882 typedef vector<TTaxId> TRet;
885 const TKey&
key, TLoaded& loaded, TRet& ret)
887 m_Key(
key), m_Loaded(loaded), m_Ret(ret)
893 return reader.
LoadTaxIds(GetResult(), m_Key, m_Loaded, m_Ret);
895 bool MayBeSkipped(
void)
const
901 return sx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
903 string GetErrMsg(
void)
const
905 return "LoadTaxIds("+
906 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
909 string GetStatisticsDescription(
void)
const
912 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
919 size_t GetStatisticsCount(
void)
const
933 typedef vector<CSeq_id_Handle> TKey;
934 typedef vector<bool> TLoaded;
935 typedef vector<bool> TKnown;
936 typedef vector<int> TRet;
939 const TKey&
key, TLoaded& loaded,
940 TRet& ret, TKnown& known)
942 m_Key(
key), m_Loaded(loaded), m_Ret(ret), m_Known(known)
948 return reader.
LoadHashes(GetResult(), m_Key, m_Loaded,
951 bool MayBeSkipped(
void)
const
957 return sx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
959 string GetErrMsg(
void)
const
961 return "LoadHashes("+
962 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
965 string GetStatisticsDescription(
void)
const
968 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
975 size_t GetStatisticsCount(
void)
const
990 typedef vector<CSeq_id_Handle> TKey;
991 typedef vector<bool> TLoaded;
992 typedef vector<TSeqPos> TRet;
995 const TKey&
key, TLoaded& loaded, TRet& ret)
997 m_Key(
key), m_Loaded(loaded), m_Ret(ret)
1003 return reader.
LoadLengths(GetResult(), m_Key, m_Loaded, m_Ret);
1005 bool MayBeSkipped(
void)
const
1011 return sx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
1013 string GetErrMsg(
void)
const
1015 return "LoadLengths("+
1016 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1017 "): data not found";
1019 string GetStatisticsDescription(
void)
const
1022 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1029 size_t GetStatisticsCount(
void)
const
1031 return m_Key.size();
1043 typedef vector<CSeq_id_Handle> TKey;
1044 typedef vector<bool> TLoaded;
1045 typedef vector<CSeq_inst::EMol> TRet;
1048 const TKey&
key, TLoaded& loaded, TRet& ret)
1050 m_Key(
key), m_Loaded(loaded), m_Ret(ret)
1056 return reader.
LoadTypes(GetResult(), m_Key, m_Loaded, m_Ret);
1058 bool MayBeSkipped(
void)
const
1064 return sx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
1066 string GetErrMsg(
void)
const
1068 return "LoadTypes("+
1069 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1070 "): data not found";
1072 string GetStatisticsDescription(
void)
const
1075 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1082 size_t GetStatisticsCount(
void)
const
1084 return m_Key.size();
1096 typedef vector<CSeq_id_Handle> TKey;
1097 typedef vector<bool> TLoaded;
1098 typedef vector<int> TRet;
1101 const TKey&
key, TLoaded& loaded, TRet& ret)
1103 m_Key(
key), m_Loaded(loaded), m_Ret(ret)
1109 return reader.
LoadStates(GetResult(), m_Key, m_Loaded, m_Ret);
1113 return sx_BulkIsDone<CLoadLock>(GetResult(), m_Key, m_Loaded);
1115 string GetErrMsg(
void)
const
1117 return "LoadStates("+
1118 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1119 "): data not found";
1121 string GetStatisticsDescription(
void)
const
1124 sx_DescribeError<CLoadLock>(GetResult(), m_Key, m_Loaded)+
1131 size_t GetStatisticsCount(
void)
const
1133 return m_Key.size();
1142 static const size_t kMaxErrorSeqIds = 100;
1146 string ret =
"; seq-ids: { ";
1147 if (
result.GetRequestedId()) {
1148 ret +=
result.GetRequestedId().AsString();
1152 for (
auto key : keys) {
1158 for (
auto&
id : ids) {
1159 if (++total > kMaxErrorSeqIds)
continue;
1160 if (
cnt++ > 0) ret +=
", ";
1161 ret +=
id.AsString();
1165 if (total == 0)
return "";
1166 if (total > kMaxErrorSeqIds) {
1188 return m_Lock.IsLoadedBlobState();
1194 string GetErrMsg(
void)
const
1196 return "LoadBlobVersion("+m_Key.ToString()+
")" +
1197 sx_ErrorSeqIds(GetResult(), {m_Key}) +
": data not found";
1203 string GetStatisticsDescription(
void)
const
1205 return "blob-version("+m_Key.ToString()+
")";
1227 return m_Lock.IsLoadedBlobVersion();
1233 string GetErrMsg(
void)
const
1235 return "LoadBlobVersion("+m_Key.ToString()+
")" +
1236 sx_ErrorSeqIds(GetResult(), {m_Key}) +
": "
1243 string GetStatisticsDescription(
void)
const
1245 return "blob-version("+m_Key.ToString()+
")";
1267 if ( !blob.IsLoadedBlob() ) {
1282 m_Ids(ids), m_Mask(
mask), m_Selector(sel)
1288 return s_AllBlobsAreLoaded(GetResult(),
1289 m_Ids, m_Mask, m_Selector);
1294 m_Ids, m_Mask, m_Selector);
1296 string GetErrMsg(
void)
const
1298 return "LoadBlobs(CLoadInfoBlob_ids): "
1305 string GetStatisticsDescription(
void)
const
1307 return "blobs(...)";
1326 m_Mask(
mask), m_Selector(sel)
1332 return s_Blob_idsLoaded(m_Ids, GetResult(), m_Key) &&
1333 s_AllBlobsAreLoaded(GetResult(),
1334 m_Ids, m_Mask, m_Selector);
1339 m_Key, m_Mask, m_Selector);
1341 string GetErrMsg(
void)
const
1343 return "LoadBlobs("+m_Key.AsString()+
"): "
1350 string GetStatisticsDescription(
void)
const
1352 return "blobs("+m_Key.AsString()+
")";
1373 m_BlobInfo(blob_info)
1379 return m_Lock.IsLoadedBlob();
1384 return reader.
LoadBlob(GetResult(), *m_BlobInfo);
1387 return reader.
LoadBlob(GetResult(), m_Key);
1390 string GetErrMsg(
void)
const
1392 return "LoadBlob("+m_Key.ToString()+
")" +
1393 sx_ErrorSeqIds(GetResult(), {m_Key}) +
": "
1400 string GetStatisticsDescription(
void)
const
1402 return "blob("+m_Key.ToString()+
")";
1429 return m_Lock.IsLoadedChunk();
1433 return reader.
LoadChunk(GetResult(), m_Key, m_ChunkId);
1435 string GetErrMsg(
void)
const
1437 return "LoadChunk("+m_Key.ToString()+
", "+
1439 sx_ErrorSeqIds(GetResult(), {m_Key}) +
": "
1446 string GetStatisticsDescription(
void)
const
1448 return "chunk("+m_Key.ToString()+
"."+
1464 typedef vector<TChunkId> TChunkIds;
1468 const TChunkIds chunk_ids)
1471 m_ChunkIds(chunk_ids)
1477 ITERATE ( TChunkIds, it, m_ChunkIds ) {
1478 if ( !m_Lock.IsLoadedChunk(*it) ) {
1486 return reader.
LoadChunks(GetResult(), m_Key, m_ChunkIds);
1488 string GetErrMsg(
void)
const
1491 str <<
"LoadChunks(" << m_Key.ToString() <<
"; chunks: {";
1493 ITERATE ( TChunkIds, it, m_ChunkIds ) {
1494 if ( !m_Lock.IsLoadedChunk(*it) ) {
1499 str <<
" })" + sx_ErrorSeqIds(GetResult(), {m_Key}) +
": data not found";
1506 string GetStatisticsDescription(
void)
const
1510 ITERATE ( TChunkIds, it, m_ChunkIds ) {
1514 str <<
"chunk(" << m_Key.ToString() <<
'.';
1524 str <<
"blob(" << m_Key.ToString();
1533 TChunkIds m_ChunkIds;
1541 const TIds& seq_ids)
1555 if ( !s_Blob_idsLoaded(blob_ids,
result, *
id) ) {
1564 if ( !blob.IsLoadedBlob() ) {
1575 string GetErrMsg(
void)
const
1577 return "LoadBlobSet(" +
1585 string GetStatisticsDescription(
void)
const
1629 if ( asking_reader ) {
1631 if ( rdr->second == asking_reader ) {
1637 CReader& reader = *rdr->second;
1638 command.GetResult().SetLevel(rdr->first);
1639 int retry_count = 0;
1645 if ( !
command.Execute(reader) ) {
1655 "CReadDispatcher: connection reopened "
1656 "due to inactivity timeout");
1660 "CReadDispatcher: Exception: "<<exc);
1664 if ( retry_count >= max_retry_count &&
1670 "CReadDispatcher: Exception: "<<exc);
1675 if ( retry_count >= max_retry_count &&
1681 "CReadDispatcher: Exception: "<<exc);
1683 catch ( exception& exc ) {
1685 if ( retry_count >= max_retry_count &&
1691 "CReadDispatcher: Exception: "<<exc.
what());
1696 }
while ( retry_count < max_retry_count );
1697 if ( !
command.MayBeSkipped() &&
1704 if ( !
command.MayBeSkipped() &&
1811 CCommandLoadHashes
command(
result, ids, loaded, ret, known);
1918 const TIds& seq_ids)
1934 if ( lock.IsLoaded() ) {
1960 if ( ids_lock && !ids_lock.GetData().
IsFound() ) {
1974 size_t count =
command.GetStatisticsCount();
1978 string descr =
command.GetStatisticsDescription();
1981 descr = descr +
" for " + idh.
AsString();
1984 "Dispatcher: read " <<
1986 setiosflags(ios::fixed) <<
1987 setprecision(3) << (time*1000) <<
" ms");
2001 string descr =
command.GetStatisticsDescription();
2004 descr = descr +
" for " + idh.
AsString();
2008 setiosflags(ios::fixed) <<
2010 (time*1000) <<
" ms (" <<
2012 (
size/1024.0) <<
" kB " <<
2014 (
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)
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
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)
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
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 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)
#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_)
static const char * str(char *buf, int n)
CReadDispatcherCommand & m_Command
SSaveResultLevel(CReadDispatcherCommand &command)
CReadDispatcher::TLevel m_SavedLevel