1 #ifndef GBLOADER_REQUEST_RESULT__HPP_INCLUDED
2 #define GBLOADER_REQUEST_RESULT__HPP_INCLUDED
67 class CReaderRequestConn;
79 typedef vector<CSeq_id_Handle>
TList;
97 return m_Ref->GetData();
99 operator const TList&(void)
const
116 void SetNotFound(
void);
120 return Get().empty();
128 return Get().begin();
141 string FindLabel(
void)
const;
155 typedef vector< CConstRef<CID2S_Seq_annot_Info> >
TAnnotInfo;
159 return m_NamedAnnotNames;
167 void AddNamedAnnotName(
const string& name);
201 return m_AnnotInfo.NotEmpty();
248 void SetNotFound(
void);
252 return m_Ref->GetData();
261 return Get().empty();
269 return Get().begin();
305 typedef GBL::CInfoCache<CSeq_id_Handle, TSequenceAcc>
TCacheAcc;
308 typedef GBL::CInfoCache<CSeq_id_Handle, TSequenceGi>
TCacheGi;
317 typedef GBL::CInfoCache<CSeq_id_Handle, TSequenceHash>
TCacheHash;
321 typedef GBL::CInfoCache<CSeq_id_Handle, TSequenceType>
TCacheType;
343 public CGBInfoManager::TCacheSeqIds::TInfoLock
345 typedef CGBInfoManager::TCacheSeqIds::TInfoLock
TParent;
360 return GetData().GetState();
365 return data.IsFound();
369 return IsFound(GetData());
377 return GetExpType(GetData());
382 return SetLoaded(
data, GetExpType(
data));
386 return SetLoadedFor(
data, expiration_time);
390 return SetLoadedFor(ids.
GetSeq_ids(), ids.GetExpirationTime());
396 public CGBInfoManager::TCacheGi::TInfoLock
398 typedef CGBInfoManager::TCacheGi::TInfoLock
TParent;
411 return data.sequence_found;
415 return IsFound(GetData());
423 return GetExpType(GetData());
432 return GetExpirationTime();
440 return SetLoaded(
data, GetExpType(
data));
444 return SetLoadedFor(
data, expiration_time);
450 public CGBInfoManager::TCacheAcc::TInfoLock
452 typedef CGBInfoManager::TCacheAcc::TInfoLock
TParent;
465 return data.sequence_found;
469 return IsFound(GetData());
477 return GetExpType(GetData());
486 return GetExpirationTime();
494 return SetLoaded(
data, GetExpType(
data));
498 return SetLoadedFor(
data, expiration_time);
504 public CGBInfoManager::TCacheLabel::TInfoLock
506 typedef CGBInfoManager::TCacheLabel::TInfoLock
TParent;
515 return !
data.empty();
519 return IsFound(GetData());
527 return GetExpType(GetData());
540 return SetLoaded(
data, GetExpType(
data));
544 return SetLoadedFor(
data, expiration_time);
550 public CGBInfoManager::TCacheTaxId::TInfoLock
552 typedef CGBInfoManager::TCacheTaxId::TInfoLock
TParent;
565 return IsFound(GetData());
573 return GetExpType(GetData());
586 return SetLoaded(
data, GetExpType(
data));
590 return SetLoadedFor(
data, expiration_time);
596 public CGBInfoManager::TCacheHash::TInfoLock
598 typedef CGBInfoManager::TCacheHash::TInfoLock
TParent;
611 return data.sequence_found;
615 return IsFound(GetData());
623 return GetExpType(GetData());
636 return SetLoaded(
data, GetExpType(
data));
640 return SetLoadedFor(
data, expiration_time);
646 public CGBInfoManager::TCacheLength::TInfoLock
648 typedef CGBInfoManager::TCacheLength::TInfoLock
TParent;
661 return IsFound(GetData());
669 return GetExpType(GetData());
682 return SetLoaded(
data, GetExpType(
data));
686 return SetLoadedFor(
data, expiration_time);
692 public CGBInfoManager::TCacheType::TInfoLock
694 typedef CGBInfoManager::TCacheType::TInfoLock
TParent;
707 return data.sequence_found;
711 return IsFound(GetData());
719 return GetExpType(GetData());
732 return SetLoaded(
data, GetExpType(
data));
736 return SetLoadedFor(
data, expiration_time);
742 public CGBInfoManager::TCacheBlobIds::TInfoLock
744 typedef CGBInfoManager::TCacheBlobIds::TInfoLock
TParent;
762 return GetData().GetState();
767 return data.IsFound();
771 return IsFound(GetData());
779 return GetExpType(GetData());
784 return SetLoadedFor(
data, expiration_time);
788 return SetLoaded(
data, GetExpType(
data));
791 const TData& blob_ids,
792 TExpirationTime expiration_time);
794 const TData& blob_ids);
796 TExpirationTime expiration_time)
806 return SetLoadedBlob_ids(ids.
GetBlob_ids(), ids.GetExpirationTime());
812 public CGBInfoManager::TCacheBlobState::TInfoLock
814 typedef CGBInfoManager::TCacheBlobState::TInfoLock
TParent;
829 return IsFound(GetData());
837 return GetExpType(GetData());
852 public CGBInfoManager::TCacheBlobVersion::TInfoLock
854 typedef CGBInfoManager::TCacheBlobVersion::TInfoLock
TParent;
869 return IsFound(GetData());
877 return GetExpType(GetData());
897 public CGBInfoManager::TCacheBlob::TInfoLock
899 typedef CGBInfoManager::TCacheBlob::TInfoLock
TParent;
911 return TParent::IsLoaded();
914 void SelectChunk(
TChunkId chunk_id);
915 TChunkId GetSelectedChunkId(
void)
const;
917 bool IsLoadedChunk(
void)
const;
918 bool IsLoadedChunk(
TChunkId chunk_id)
const;
926 TBlobVersion GetKnownBlobVersion(
void)
const;
929 bool NeedsDelayedMainChunk(
void)
const;
950 public CGBInfoManager::TCacheBlob::TInfoLock
952 typedef CGBInfoManager::TCacheBlob::TInfoLock
TParent;
965 bool IsLoaded(
void)
const;
966 void SetLoaded(
void);
970 return m_TSE_LoadLock;
979 TBlobState GetBlobState(
void)
const;
983 void AllowIncompleteLoading();
987 void x_SelectChunk(
TChunkId chunk_id);
1108 const string&
value);
1155 bool IsLoadedBlobState(
const TKeyBlob& blob_id);
1163 bool IsLoadedBlobVersion(
const TKeyBlob& blob_id);
1199 void ReleaseNotLoadedBlobs(
void);
1205 void ReleaseLocks(
void);
1226 virtual bool GetAddWGSMasterDescr(
void)
const;
1230 CWriter* GetIdWriter(
void)
const;
1231 CWriter* GetBlobWriter(
void)
const;
1267 bool in_processor =
false);
User-defined methods of the data storage class.
const TAnnotInfo & GetAnnotInfo(void) const
const TNamedAnnotNames & GetNamedAnnotNames(void) const
vector< CConstRef< CID2S_Seq_annot_Info > > TAnnotInfo
TNamedAnnotNames m_NamedAnnotNames
set< string > TNamedAnnotNames
const TContentsMask & GetContentsMask(void) const
const CConstRef< CBlob_Annot_Info > & GetAnnotInfo(void) const
CConstRef< CBlob_id > m_Blob_id
DECLARE_OPERATOR_BOOL_REF(m_Blob_id)
const CConstRef< CBlob_id > & GetBlob_id(void) const
TBlobContentsMask TContentsMask
bool IsSetAnnotInfo(void) const
CConstRef< CBlob_Annot_Info > m_AnnotInfo
TList::const_reference const_reference
TState GetState(void) const
vector< CBlob_Info > TList
const_iterator end(void) const
const_reference front(void) const
const TList & Get(void) const
const_iterator begin(void) const
CObjectFor< TList > TObject
TList::const_iterator const_iterator
CConstRef< TObject > m_Ref
TState GetState(void) const
TList::const_iterator const_iterator
vector< CSeq_id_Handle > TList
const TList & Get(void) const
const_iterator begin(void) const
CObjectFor< TList > TObject
const_reference front(void) const
TList::const_reference const_reference
CConstRef< TObject > m_Ref
const_iterator end(void) const
TCacheBlobState m_CacheBlobState
GBL::CInfoCache< CSeq_id_Handle, TSequenceAcc > TCacheAcc
GBL::CInfoCache< CBlob_id, TBlobVersion > TCacheBlobVersion
TCacheLength m_CacheLength
GBL::CInfoCache< CBlob_id, TBlobState > TCacheBlobState
GBL::CInfoCache< CSeq_id_Handle, TSequenceGi > TCacheGi
CDataLoader::SAccVerFound TSequenceAcc
GBL::CInfoCache< CSeq_id_Handle, string > TCacheLabel
TCacheBlobIds m_CacheBlobIds
GBL::CInfoCache< CSeq_id_Handle, TTaxId > TCacheTaxId
GBL::CInfoCache< CSeq_id_Handle, TSequenceType > TCacheType
GBL::CInfoCache< CSeq_id_Handle, TSequenceHash > TCacheHash
CDataLoader::SGiFound TSequenceGi
TCacheSeqIds m_CacheSeqIds
GBL::CInfoCache< CSeq_id_Handle, CFixedSeq_ids > TCacheSeqIds
CDataLoader::STypeFound TSequenceType
TCacheBlobVersion m_CacheBlobVersion
GBL::CInfoCache< TKeyBlobIds, CFixedBlob_ids > TCacheBlobIds
CDataLoader::SHashFound TSequenceHash
pair< CSeq_id_Handle, string > TKeyBlobIds
GBL::CInfoCache< CBlob_id, CTSE_LoadLock > TCacheBlob
GBL::CInfoCache< CSeq_id_Handle, TSequenceLength > TCacheLength
CInfoManager & GetManager(void) const
CGBInfoManager::TCacheAcc::TInfoLock TParent
static bool IsFound(const TData &data)
TData GetAccVer(void) const
TExpirationTime GetExpirationTimeAcc(void) const
static const CSeq_id_Handle & GetAcc(const TData &data)
bool SetLoadedAccVer(const TData &data, TExpirationTime expiration_time)
GBL::EExpirationType GetExpType(void) const
bool IsLoadedAccVer(void) const
bool SetLoadedAccVer(const TData &data)
static GBL::EExpirationType GetExpType(const TData &data)
static GBL::EExpirationType GetExpType(const TData &data)
bool SetLoadedBlob_ids(const TData &data)
bool SetLoadedBlob_ids(const CLoadLockBlobIds &ids)
static bool IsFound(const TData &data)
bool SetNoBlob_ids(const CFixedBlob_ids::TState &state, TExpirationTime expiration_time)
TData GetBlob_ids(void) const
CGBInfoManager::TCacheBlobIds::TInfoLock TParent
bool SetNoBlob_ids(const CFixedBlob_ids::TState &state)
GBL::EExpirationType GetExpType(void) const
TData::TState GetState(void) const
bool SetLoadedBlob_ids(const TData &data, TExpirationTime expiration_time)
CGBInfoManager::TCacheBlobState::TInfoLock TParent
static bool IsFound(const TData &data)
static GBL::EExpirationType GetExpType(const TData &data)
GBL::EExpirationType GetExpType(void) const
TData GetBlobState(void) const
bool IsLoadedBlobState(void) const
bool IsLoadedBlobVersion(void) const
CGBInfoManager::TCacheBlobVersion::TInfoLock TParent
TData GetBlobVersion(void) const
GBL::EExpirationType GetExpType(void) const
CLoadLockBlobVersion(void)
static GBL::EExpirationType GetExpType(const TData &data)
static bool IsFound(const TData &data)
CConstRef< CTSE_Chunk_Info > m_Chunk
CGBInfoManager::TBlobVersion TBlobVersion
CGBInfoManager::TCacheBlob::TInfoLock TParent
CTSE_LoadLock m_TSE_LoadLock
const CTSE_Chunk_Info & GetTSE_Chunk_Info(void)
bool IsLoadedBlob(void) const
CGBInfoManager::TChunkId TChunkId
bool SetLoadedGi(const TData &data)
bool IsLoadedGi(void) const
static bool IsFound(const TData &data)
TExpirationTime GetExpirationTimeGi(void) const
bool SetLoadedGi(const TData &data, TExpirationTime expiration_time)
CGBInfoManager::TCacheGi::TInfoLock TParent
static TGi GetGi(const TData &data)
GBL::EExpirationType GetExpType(void) const
static GBL::EExpirationType GetExpType(const TData &data)
bool SetLoadedHash(const TData &data, TExpirationTime expiration_time)
bool SetLoadedHash(const TData &data)
static GBL::EExpirationType GetExpType(const TData &data)
bool IsLoadedHash(void) const
static int GetHash(const TData &data)
TData GetHash(void) const
CGBInfoManager::TCacheHash::TInfoLock TParent
GBL::EExpirationType GetExpType(void) const
static bool IsFound(const TData &data)
static GBL::EExpirationType GetExpType(const TData &data)
static bool IsFound(const TData &data)
CGBInfoManager::TCacheLabel::TInfoLock TParent
GBL::EExpirationType GetExpType(void) const
bool IsLoadedLabel(void) const
bool SetLoadedLabel(const TData &data, TExpirationTime expiration_time)
bool SetLoadedLabel(const TData &data)
TData GetLabel(void) const
CGBInfoManager::TCacheLength::TInfoLock TParent
TData GetLength(void) const
GBL::EExpirationType GetExpType(void) const
bool IsLoadedLength(void) const
static bool IsFound(const TData &data)
bool SetLoadedLength(const TData &data, TExpirationTime expiration_time)
bool SetLoadedLength(const TData &data)
static GBL::EExpirationType GetExpType(const TData &data)
CGBInfoManager::TCacheSeqIds::TInfoLock TParent
bool SetLoadedSeq_ids(const CLoadLockSeqIds &ids)
TData GetSeq_ids(void) const
static bool IsFound(const TData &data)
bool SetLoadedSeq_ids(const TData &data)
static GBL::EExpirationType GetExpType(const TData &data)
TData::TState GetState(void) const
GBL::EExpirationType GetExpType(void) const
bool SetLoadedSeq_ids(const TData &data, TExpirationTime expiration_time)
void x_ObtainTSE_LoadLock(CReaderRequestResult &result, const CBlob_id &blob_id)
bool m_AllowIncompleteLoading
AutoPtr< CInitGuard > m_ChunkLoadLock
CTSE_LoadLock m_TSE_LoadLock
CTSE_Chunk_Info & GetTSE_Chunk_Info(void)
CGBInfoManager::TBlobState TBlobState
CRef< CTSE_Chunk_Info > m_Chunk
CGBInfoManager::TChunkId TChunkId
CGBInfoManager::TBlobVersion TBlobVersion
CTSE_LoadLock & GetTSE_LoadLock(void)
CGBInfoManager::TCacheBlob::TInfoLock TParent
GBL::EExpirationType GetExpType(void) const
bool IsLoadedTaxId(void) const
CGBInfoManager::TCacheTaxId::TInfoLock TParent
bool SetLoadedTaxId(const TData &data)
TData GetTaxId(void) const
static GBL::EExpirationType GetExpType(const TData &data)
bool SetLoadedTaxId(const TData &data, TExpirationTime expiration_time)
static bool IsFound(const TData &data)
bool SetLoadedType(const TData &data)
TData GetType(void) const
CGBInfoManager::TCacheType::TInfoLock TParent
static bool IsFound(const TData &data)
static CSeq_inst::TMol GetType(const TData &data)
bool IsLoadedType(void) const
static GBL::EExpirationType GetExpType(const TData &data)
GBL::EExpirationType GetExpType(void) const
bool SetLoadedType(const TData &data, TExpirationTime expiration_time)
~CReaderRequestResultRecursion(void)
CReaderRequestResult & m_Result
double GetCurrentRequestTime(void) const
CReaderRequestResult & GetResult(void) const
int GetRecursionLevel(void) const
void operator=(const CReaderRequestResultRecursion &)
CReaderRequestResultRecursion(const CReaderRequestResultRecursion &)
CReaderRequestResultRecursion(CReaderRequestResult &result, bool in_processor=false)
CGBInfoManager::TSequenceAcc TSequenceAcc
CGBInfoManager::TCacheGi::TInfoLock TInfoLockGi
bool MarkLoadingBlobVersion(const TKeyBlob &blob_id)
TTSE_LockSet m_TSE_LockSet
CGBInfoManager::TCacheBlobIds::TInfoLock TInfoLockBlobIds
CSeq_id_Handle TKeySeq_ids2
bool IsInProcessor(void) const
TExpirationTime m_StartTime
CGBInfoManager::TSequenceLength TSequenceLength
CGBInfoManager::TCacheLength::TInfoLock TInfoLockLength
CReadDispatcher & m_ReadDispatcher
CGBInfoManager::TTaxId TTaxId
CGBInfoManager & GetGBInfoManager(void)
CSeq_id_Handle m_RequestedId
CGBInfoManager::TCacheBlobState::TInfoLock TInfoLockBlobState
CGBInfoManager::TBlobState TBlobState
void ClearRetryDelay(void)
void AddRetryDelay(double delay)
CGBInfoManager::TCacheLabel::TInfoLock TInfoLockLabel
set< TTSE_Lock > TTSE_LockSet
CReaderRequestResult(const CReaderRequestResult &)
virtual CTSE_LoadLock GetTSE_LoadLock(const TKeyBlob &blob_id)=0
CGBInfoManager::TBlobVersion TBlobVersion
CGBInfoManager::TCacheSeqIds::TInfoLock TInfoLockIds
CGBInfoManager::TCacheType::TInfoLock TInfoLockType
CReaderAllocatedConnection * m_AllocatedConnection
vector< CBlob_id > TLoadedBlob_ids
CGBInfoManager::TCacheHash::TInfoLock TInfoLockHash
CGBInfoManager::TCacheTaxId::TInfoLock TInfoLockTaxId
double GetRetryDelay(void) const
CGBInfoManager::TCacheAcc::TInfoLock TInfoLockAcc
CGBInfoManager::TCacheBlobVersion::TInfoLock TInfoLockBlobVersion
CGBInfoManager::TSequenceHash TSequenceHash
bool MarkLoadingBlobState(const TKeyBlob &blob_id)
virtual CTSE_LoadLock GetTSE_LoadLockIfLoaded(const TKeyBlob &blob_id)=0
CGBInfoManager::TCacheBlob::TInfoLock TInfoLockBlob
TExpirationTime GetStartTime(void) const
GBL::CInfo_Base::TExpirationTime TExpirationTime
pair< CSeq_id_Handle, string > TKeyBlob_ids
const CSeq_id_Handle & GetRequestedId(void) const
CGBInfoManager::TSequenceGi TSequenceGi
void SetLevel(TLevel level)
CGBInfoManager::TSequenceType TSequenceType
CReaderRequestResult & operator=(const CReaderRequestResult &)
unsigned int TSeqPos
Type for sequence locations and lengths.
SStrictId_Tax::TId TTaxId
Taxon id type.
const TSeqPos kInvalidSeqPos
Define special value for invalid sequence position.
TGi FindGi(const container &ids)
Return gi from id list if exists, return 0 otherwise.
#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.
ENcbiOwnership
Ownership relations between objects.
#define NCBI_XREADER_EXPORT
EMol
molecule class in living organism
const TYPE & Get(const CNamedParameterList *param)
SNetStorageObjectState< SNetStorageObjectDirectState< TBase > > TState
constexpr bool empty(list< Ts... >) noexcept
const string version
version string
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
Multi-threading – mutexes; rw-locks; semaphore.
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
Defines: CTimeFormat - storage class for time format.
void Filter(TTimeline &timeline, TServers &servers)
Better replacement of GetAccVer(), this method should be defined in data loaders, GetAccVer() is left...
Better replacement of GetGi(), this method should be defined in data loaders, GetGi() is left for com...
Better replacement of GetSequenceHash(), this method should be defined in data loaders,...
Better replacement of GetSequenceType(), this method should be defined in data loaders,...