NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
CReader Class Referenceabstract

Search Toolkit Book for CReader

#include <objtools/data_loaders/genbank/reader.hpp>

+ Inheritance diagram for CReader:
+ Collaboration diagram for CReader:

Classes

class  CDebugPrinter
 
struct  SConnSlot
 

Public Types

typedef unsigned TConn
 
typedef CBlob_id TBlobId
 
typedef int TState
 
typedef int TBlobState
 
typedef int TBlobVersion
 
typedef int TBlobSplitVersion
 
typedef int TChunkId
 
typedef int TContentsMask
 
typedef vector< TChunkIdTChunkIds
 
typedef vector< CSeq_id_HandleTSeqIds
 
typedef vector< CBlob_InfoTBlobIds
 
typedef vector< CSeq_id_HandleTIds
 
typedef vector< boolTLoaded
 
typedef vector< TIdsTBulkIds
 
typedef vector< TGiTGis
 
typedef vector< stringTLabels
 
typedef vector< TTaxIdTTaxIds
 
typedef vector< intTStates
 
typedef vector< intTHashes
 
typedef vector< boolTKnown
 
typedef vector< TSeqPosTLengths
 
typedef vector< CSeq_inst::EMolTTypes
 
typedef vector< CBlob_idTPlainBlobIds
 
typedef vector< pair< TBlobId, TChunkIds > > TBlobChunkIds
 
typedef CDataLoader::SAccVerFound TSequenceAcc
 
typedef CDataLoader::SGiFound TSequenceGi
 
typedef CDataLoader::STypeFound TSequenceType
 
typedef CDataLoader::SHashFound TSequenceHash
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 

Public Member Functions

 CReader (void)
 
virtual ~CReader (void)
 
void InitParams (CConfig &conf, const string &driver_name, int default_max_conn)
 
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. More...
 
virtual bool LoadSeq_idSeq_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id)=0
 
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 LoadSeq_idLabel (CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
 
virtual bool LoadSeq_idTaxId (CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
 
virtual bool LoadSequenceHash (CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
 
virtual bool LoadSequenceLength (CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
 
virtual bool LoadSequenceType (CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
 
virtual bool LoadBulkIds (CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TBulkIds &ret)
 
virtual bool LoadAccVers (CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TIds &ret)
 
virtual bool LoadGis (CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TGis &ret)
 
virtual bool LoadLabels (CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TLabels &ret)
 
virtual bool LoadTaxIds (CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TTaxIds &ret)
 
virtual bool LoadHashes (CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, THashes &ret, TKnown &known)
 
virtual bool LoadLengths (CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TLengths &ret)
 
virtual bool LoadTypes (CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TTypes &ret)
 
virtual bool LoadStates (CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TStates &ret)
 
virtual bool LoadBlobState (CReaderRequestResult &result, const TBlobId &blob_id)=0
 
virtual bool LoadBlobVersion (CReaderRequestResult &result, const TBlobId &blob_id)=0
 
virtual bool LoadBlobs (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, TContentsMask mask, const SAnnotSelector *sel)
 
virtual bool LoadBlobs (CReaderRequestResult &result, const CLoadLockBlobIds &lock, TContentsMask mask, const SAnnotSelector *sel)
 
virtual bool LoadBlob (CReaderRequestResult &result, const CBlob_id &blob_id)=0
 
virtual bool LoadBlob (CReaderRequestResult &result, const CBlob_Info &blob_info)
 
virtual bool LoadChunk (CReaderRequestResult &result, const TBlobId &blob_id, TChunkId chunk_id)
 
virtual bool LoadChunks (CReaderRequestResult &result, const TBlobId &blob_id, const TChunkIds &chunk_ids)
 
virtual bool LoadChunks (CReaderRequestResult &result, const TBlobChunkIds &chunk_ids)
 
virtual bool LoadBlobSet (CReaderRequestResult &result, const TSeqIds &seq_ids)
 
virtual bool LoadBlobs (CReaderRequestResult &result, const TBlobIds &blob_infos)
 
void SetAndSaveSeq_idSeq_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const CFixedSeq_ids &seq_ids) const
 
void SetAndSaveNoSeq_idSeq_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, TState state) const
 
void SetAndSaveSeq_idAccVer (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const TSequenceAcc &acc_id) const
 
void SetAndSaveSeq_idGi (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const TSequenceGi &gi) const
 
void SetAndSaveSeq_idAccFromSeqIds (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const CLoadLockSeqIds &seq_ids) const
 
void SetAndSaveSeq_idGiFromSeqIds (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const CLoadLockSeqIds &seq_ids) const
 
void SetAndSaveSeq_idSeq_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const CLoadLockSeqIds &seq_ids) const
 
void SetAndSaveNoSeq_idSeq_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const CLoadLockGi &gi_lock) const
 
void SetAndSaveSeq_idBlob_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const SAnnotSelector *sel, CLoadLockBlobIds &lock, const CLoadLockBlobIds &blob_ids) const
 
void SetAndSaveNoSeq_idBlob_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const SAnnotSelector *sel, const CLoadLockGi &gi_lock) const
 
void SetAndSaveSeq_idTaxId (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, TTaxId taxid) const
 
void SetAndSaveSequenceHash (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const TSequenceHash &hash) const
 
void SetAndSaveSequenceLength (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, TSeqPos length) const
 
void SetAndSaveSequenceType (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const TSequenceType &type) const
 
void SetAndSaveSeq_idBlob_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const SAnnotSelector *sel, const CFixedBlob_ids &blob_ids) const
 
void SetAndSaveNoSeq_idBlob_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const SAnnotSelector *sel, TBlobState state) const
 
void SetAndSaveBlobState (CReaderRequestResult &result, const TBlobId &blob_id, TBlobState blob_state) const
 
void SetAndSaveBlobVersion (CReaderRequestResult &result, const TBlobId &blob_id, TBlobVersion version) const
 
void SetAndSaveNoBlob (CReaderRequestResult &result, const TBlobId &blob_id, TChunkId chunk_id, TBlobState blob_state)
 
void SetAndSaveSeq_idLabelFromSeqIds (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const CLoadLockSeqIds &seq_ids) const
 
void SetAndSaveSeq_idLabel (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const string &label) const
 
void SetAndSaveSeq_idBlob_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const SAnnotSelector *sel, CLoadLockBlobIds &lock, const CFixedBlob_ids &blob_ids) const
 
void SetAndSaveNoSeq_idBlob_ids (CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const SAnnotSelector *sel, CLoadLockBlobIds &lock, TBlobState state) const
 
int SetMaximumConnections (int max)
 
void SetMaximumConnections (int max, int default_max)
 
int GetMaximumConnections (void) const
 
virtual int GetMaximumConnectionsLimit (void) const
 
void SetPreopenConnection (bool preopen=true)
 
bool GetPreopenConnection (void) const
 
void OpenInitialConnection (bool force)
 
virtual int GetConst (const string &const_name) const
 
void SetMaximumRetryCount (int retry_count)
 
virtual int GetRetryCount (void) const
 
virtual bool MayBeSkippedOnErrors (void) const
 
virtual void InitializeCache (CReaderCacheManager &cache_manager, const TPluginManagerParamTree *params)
 
virtual void ResetCache (void)
 
virtual void OpenConnection (TConn conn)
 
virtual void WaitBeforeNewConnection (TConn conn)
 
virtual void ConnectSucceeds (TConn conn)
 
virtual void ConnectFailed (TConn conn)
 
virtual void SetNewConnectionDelayMicroSec (unsigned long micro_sec)
 
virtual void SetIncludeHUP (bool include_hup=true, const string &web_cookie=NcbiEmptyString)
 
bool HasHUPIncluded () const
 
virtual void SetParams (const CReaderParams &params)
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
 
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
 
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
 
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
 
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
 
void AddReference (void) const
 Add reference to object. More...
 
void RemoveReference (void) const
 Remove reference to object. More...
 
void ReleaseReference (void) const
 Remove reference without deleting object. More...
 
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
 
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
 
void * operator new (size_t size)
 Define new operator for memory allocation. More...
 
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
 
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
 
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
 
void * operator new (size_t size, void *place)
 Define new operator. More...
 
void operator delete (void *ptr, void *place)
 Define delete operator. More...
 
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
 
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
 
virtual ~CDebugDumpable (void)
 
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
 
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
 
void DumpToConsole (void) const
 

Static Public Member Functions

static int ReadInt (CNcbiIstream &stream)
 
- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 

Protected Types

typedef CReaderAllocatedConnection CConn
 

Protected Member Functions

virtual void x_AddConnectionSlot (TConn conn)=0
 
virtual void x_RemoveConnectionSlot (TConn conn)=0
 
virtual void x_DisconnectAtSlot (TConn conn, bool failed)
 
virtual void x_ConnectAtSlot (TConn conn)=0
 
void x_ReportDisconnect (const char *reader, const char *server, TConn conn, bool failed) const
 
void x_SetIncludeHUP (bool include_hup)
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Protected Attributes

CReadDispatcherm_Dispatcher
 

Private Types

typedef list< SConnSlotTFreeConnections
 

Private Member Functions

TConn x_AllocConnection (bool oldest=false)
 
void x_ReleaseConnection (TConn conn, double retry_delay=0)
 
void x_ReleaseClosedConnection (TConn conn)
 
void x_AbortConnection (TConn conn, bool failed)
 
void x_AddConnection (void)
 
void x_RemoveConnection (void)
 
 CReader (const CReader &)
 
void operator= (const CReader &)
 

Private Attributes

TConn m_MaxConnections
 
bool m_PreopenConnection
 
bool m_IncludeHUP
 
TConn m_NextNewConnection
 
TFreeConnections m_FreeConnections
 
CMutex m_ConnectionsMutex
 
CSemaphore m_NumFreeConnections
 
int m_MaximumRetryCount
 
atomic< intm_ConnectFailCount
 
CTime m_LastTimeFailed
 
CTime m_NextConnectTime
 
int m_WaitTimeErrors
 
CIncreasingTime m_WaitTime
 

Friends

class CReadDispatcher
 
class CReaderAllocatedConnection
 

Additional Inherited Members

- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
 
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
 
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
 
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
 
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
 
static const TCount eCounterStateMask
 Valid object, and object in heap. More...
 

Detailed Description

Definition at line 78 of file reader.hpp.

Member Typedef Documentation

◆ CConn

Definition at line 355 of file reader.hpp.

◆ TBlobChunkIds

typedef vector<pair<TBlobId, TChunkIds> > CReader::TBlobChunkIds

Definition at line 135 of file reader.hpp.

◆ TBlobId

Definition at line 88 of file reader.hpp.

◆ TBlobIds

typedef vector<CBlob_Info> CReader::TBlobIds

Definition at line 97 of file reader.hpp.

◆ TBlobSplitVersion

Definition at line 92 of file reader.hpp.

◆ TBlobState

Definition at line 90 of file reader.hpp.

◆ TBlobVersion

Definition at line 91 of file reader.hpp.

◆ TBulkIds

typedef vector<TIds> CReader::TBulkIds

Definition at line 125 of file reader.hpp.

◆ TChunkId

Definition at line 93 of file reader.hpp.

◆ TChunkIds

typedef vector<TChunkId> CReader::TChunkIds

Definition at line 95 of file reader.hpp.

◆ TConn

typedef unsigned CReader::TConn

Definition at line 87 of file reader.hpp.

◆ TContentsMask

Definition at line 94 of file reader.hpp.

◆ TFreeConnections

typedef list<SConnSlot> CReader::TFreeConnections
private

Definition at line 396 of file reader.hpp.

◆ TGis

typedef vector<TGi> CReader::TGis

Definition at line 126 of file reader.hpp.

◆ THashes

typedef vector<int> CReader::THashes

Definition at line 130 of file reader.hpp.

◆ TIds

typedef vector<CSeq_id_Handle> CReader::TIds

Definition at line 123 of file reader.hpp.

◆ TKnown

typedef vector<bool> CReader::TKnown

Definition at line 131 of file reader.hpp.

◆ TLabels

typedef vector<string> CReader::TLabels

Definition at line 127 of file reader.hpp.

◆ TLengths

typedef vector<TSeqPos> CReader::TLengths

Definition at line 132 of file reader.hpp.

◆ TLoaded

typedef vector<bool> CReader::TLoaded

Definition at line 124 of file reader.hpp.

◆ TPlainBlobIds

Definition at line 134 of file reader.hpp.

◆ TSeqIds

Definition at line 96 of file reader.hpp.

◆ TSequenceAcc

Definition at line 192 of file reader.hpp.

◆ TSequenceGi

Definition at line 193 of file reader.hpp.

◆ TSequenceHash

Definition at line 195 of file reader.hpp.

◆ TSequenceType

Definition at line 194 of file reader.hpp.

◆ TState

Definition at line 89 of file reader.hpp.

◆ TStates

typedef vector<int> CReader::TStates

Definition at line 129 of file reader.hpp.

◆ TTaxIds

typedef vector<TTaxId> CReader::TTaxIds

Definition at line 128 of file reader.hpp.

◆ TTypes

Definition at line 133 of file reader.hpp.

Constructor & Destructor Documentation

◆ CReader() [1/2]

CReader::CReader ( void  )

Definition at line 111 of file reader.cpp.

◆ ~CReader()

CReader::~CReader ( void  )
virtual

Definition at line 126 of file reader.cpp.

◆ CReader() [2/2]

CReader::CReader ( const CReader )
private

Member Function Documentation

◆ ConnectFailed()

void CReader::ConnectFailed ( TConn  conn)
virtual

Definition at line 310 of file reader.cpp.

References CTime::eCurrent, m_ConnectFailCount, m_ConnectionsMutex, and m_LastTimeFailed.

Referenced by OpenConnection().

◆ ConnectSucceeds()

void CReader::ConnectSucceeds ( TConn  conn)
virtual

Definition at line 304 of file reader.cpp.

References m_ConnectFailCount.

Referenced by OpenConnection().

◆ GetConst()

int CReader::GetConst ( const string const_name) const
virtual

Definition at line 466 of file reader.cpp.

◆ GetMaximumConnections()

int CReader::GetMaximumConnections ( void  ) const

Definition at line 260 of file reader.cpp.

References m_MaxConnections.

Referenced by OpenInitialConnection(), SetMaximumConnections(), and x_AllocConnection().

◆ GetMaximumConnectionsLimit()

int CReader::GetMaximumConnectionsLimit ( void  ) const
virtual

Reimplemented in CPubseq2Reader, CPubseqReader, CId2Reader, CId1Reader, CGICacheReader, and CCacheReader.

Definition at line 266 of file reader.cpp.

Referenced by SetMaximumConnections().

◆ GetPreopenConnection()

bool CReader::GetPreopenConnection ( void  ) const

Definition at line 213 of file reader.cpp.

References m_PreopenConnection.

Referenced by OpenInitialConnection().

◆ GetRetryCount()

int CReader::GetRetryCount ( void  ) const
virtual

Reimplemented in CGICacheReader, and CCacheReader.

Definition at line 478 of file reader.cpp.

References m_MaximumRetryCount.

Referenced by OpenInitialConnection(), CReadDispatcher::Process(), and SetMaximumConnections().

◆ HasHUPIncluded()

bool CReader::HasHUPIncluded ( void  ) const
inline

Definition at line 312 of file reader.hpp.

References m_IncludeHUP.

◆ InitializeCache()

void CReader::InitializeCache ( CReaderCacheManager cache_manager,
const TPluginManagerParamTree params 
)
virtual

Reimplemented in CCacheReader.

Definition at line 1390 of file reader.cpp.

Referenced by CGBDataLoader_Native::x_CreateReader().

◆ InitParams()

void CReader::InitParams ( CConfig conf,
const string driver_name,
int  default_max_conn 
)

◆ LoadAccVers()

bool CReader::LoadAccVers ( CReaderRequestResult result,
const TIds ids,
TLoaded loaded,
TIds ret 
)
virtual

◆ LoadBlob() [1/2]

virtual bool CReader::LoadBlob ( CReaderRequestResult result,
const CBlob_id blob_id 
)
pure virtual

Implemented in CId2ReaderBase, CId1ReaderBase, CCacheReader, and CGICacheReader.

Referenced by LoadBlob().

◆ LoadBlob() [2/2]

bool CReader::LoadBlob ( CReaderRequestResult result,
const CBlob_Info blob_info 
)
virtual

◆ LoadBlobs() [1/3]

bool CReader::LoadBlobs ( CReaderRequestResult result,
const CLoadLockBlobIds lock,
TContentsMask  mask,
const SAnnotSelector sel 
)
virtual

◆ LoadBlobs() [2/3]

bool CReader::LoadBlobs ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
TContentsMask  mask,
const SAnnotSelector sel 
)
virtual

Reimplemented in CId2ReaderBase.

Definition at line 903 of file reader.cpp.

References CReadDispatcher::LoadBlobs(), LoadSeq_idBlob_ids(), m_Dispatcher, mask, and result.

Referenced by CId2ReaderBase::LoadBlobs(), and LoadBlobSet().

◆ LoadBlobs() [3/3]

bool CReader::LoadBlobs ( CReaderRequestResult result,
const TBlobIds blob_infos 
)
virtual

◆ LoadBlobSet()

bool CReader::LoadBlobSet ( CReaderRequestResult result,
const TSeqIds seq_ids 
)
virtual

Reimplemented in CId2ReaderBase.

Definition at line 1016 of file reader.cpp.

References fBlobHasCore, ITERATE, LoadBlobs(), and result.

Referenced by CId2ReaderBase::LoadBlobSet().

◆ LoadBlobState()

virtual bool CReader::LoadBlobState ( CReaderRequestResult result,
const TBlobId blob_id 
)
pure virtual

◆ LoadBlobVersion()

virtual bool CReader::LoadBlobVersion ( CReaderRequestResult result,
const TBlobId blob_id 
)
pure virtual

◆ LoadBulkIds()

bool CReader::LoadBulkIds ( CReaderRequestResult result,
const TIds ids,
TLoaded loaded,
TBulkIds ret 
)
virtual

◆ LoadChunk()

bool CReader::LoadChunk ( CReaderRequestResult result,
const TBlobId blob_id,
TChunkId  chunk_id 
)
virtual

Reimplemented in CId2ReaderBase, CId1ReaderBase, and CCacheReader.

Definition at line 985 of file reader.cpp.

Referenced by LoadChunks().

◆ LoadChunks() [1/2]

bool CReader::LoadChunks ( CReaderRequestResult result,
const TBlobChunkIds chunk_ids 
)
virtual

Reimplemented in CId2ReaderBase.

Definition at line 1005 of file reader.cpp.

References LoadChunks(), and result.

◆ LoadChunks() [2/2]

bool CReader::LoadChunks ( CReaderRequestResult result,
const TBlobId blob_id,
const TChunkIds chunk_ids 
)
virtual

Reimplemented in CId2ReaderBase.

Definition at line 993 of file reader.cpp.

References ITERATE, LoadChunk(), and result.

Referenced by LoadChunks(), and CId2ReaderBase::LoadChunks().

◆ LoadGis()

bool CReader::LoadGis ( CReaderRequestResult result,
const TIds ids,
TLoaded loaded,
TGis ret 
)
virtual

◆ LoadHashes()

bool CReader::LoadHashes ( CReaderRequestResult result,
const TIds ids,
TLoaded loaded,
THashes ret,
TKnown known 
)
virtual

◆ LoadLabels()

bool CReader::LoadLabels ( CReaderRequestResult result,
const TIds ids,
TLoaded loaded,
TLabels ret 
)
virtual

◆ LoadLengths()

bool CReader::LoadLengths ( CReaderRequestResult result,
const TIds ids,
TLoaded loaded,
TLengths ret 
)
virtual

◆ LoadSeq_idAccVer()

bool CReader::LoadSeq_idAccVer ( CReaderRequestResult result,
const CSeq_id_Handle seq_id 
)
virtual

◆ LoadSeq_idBlob_ids()

bool CReader::LoadSeq_idBlob_ids ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const SAnnotSelector sel 
)
virtual

All LoadXxx() methods should return false if there is no requested data in the reader.

This will notify dispatcher that there is no sense to retry.

Reimplemented in CPubseqReader, CId2ReaderBase, CCacheReader, and CId1Reader.

Definition at line 884 of file reader.cpp.

References SAnnotSelector::IsIncludedAnyNamedAnnotAccession(), CReadDispatcher::LoadSeq_idBlob_ids(), m_Dispatcher, result, and CLoadLockBlobIds::SetLoadedBlob_ids().

Referenced by LoadBlobs(), and CId1Reader::LoadSeq_idBlob_ids().

◆ LoadSeq_idGi()

bool CReader::LoadSeq_idGi ( CReaderRequestResult result,
const CSeq_id_Handle seq_id 
)
virtual

◆ LoadSeq_idLabel()

bool CReader::LoadSeq_idLabel ( CReaderRequestResult result,
const CSeq_id_Handle seq_id 
)
virtual

◆ LoadSeq_idSeq_ids()

virtual bool CReader::LoadSeq_idSeq_ids ( CReaderRequestResult result,
const CSeq_id_Handle seq_id 
)
pure virtual

◆ LoadSeq_idTaxId()

bool CReader::LoadSeq_idTaxId ( CReaderRequestResult result,
const CSeq_id_Handle seq_id 
)
virtual

◆ LoadSequenceHash()

bool CReader::LoadSequenceHash ( CReaderRequestResult result,
const CSeq_id_Handle seq_id 
)
virtual

◆ LoadSequenceLength()

bool CReader::LoadSequenceLength ( CReaderRequestResult result,
const CSeq_id_Handle seq_id 
)
virtual

◆ LoadSequenceType()

bool CReader::LoadSequenceType ( CReaderRequestResult result,
const CSeq_id_Handle seq_id 
)
virtual

◆ LoadStates()

bool CReader::LoadStates ( CReaderRequestResult result,
const TIds ids,
TLoaded loaded,
TStates ret 
)
virtual

◆ LoadTaxIds()

bool CReader::LoadTaxIds ( CReaderRequestResult result,
const TIds ids,
TLoaded loaded,
TTaxIds ret 
)
virtual

◆ LoadTypes()

bool CReader::LoadTypes ( CReaderRequestResult result,
const TIds ids,
TLoaded loaded,
TTypes ret 
)
virtual

◆ MayBeSkippedOnErrors()

bool CReader::MayBeSkippedOnErrors ( void  ) const
virtual

Reimplemented in CGICacheReader, and CCacheReader.

Definition at line 484 of file reader.cpp.

Referenced by CReadDispatcher::Process().

◆ OpenConnection()

void CReader::OpenConnection ( TConn  conn)
virtual

◆ OpenInitialConnection()

void CReader::OpenInitialConnection ( bool  force)

◆ operator=()

void CReader::operator= ( const CReader )
private

◆ ReadInt()

int CReader::ReadInt ( CNcbiIstream stream)
static

Definition at line 1378 of file reader.cpp.

References NCBI_THROW, and rapidjson::value.

Referenced by CCacheReader::x_ProcessBlob().

◆ ResetCache()

void CReader::ResetCache ( void  )
virtual

Reimplemented in CCacheReader.

Definition at line 1396 of file reader.cpp.

◆ SetAndSaveBlobState()

void CReader::SetAndSaveBlobState ( CReaderRequestResult result,
const TBlobId blob_id,
TBlobState  blob_state 
) const

Definition at line 1097 of file reader.cpp.

References result.

Referenced by CId1Reader::GetBlobVersion(), and CCacheReader::LoadBlobState().

◆ SetAndSaveBlobVersion()

void CReader::SetAndSaveBlobVersion ( CReaderRequestResult result,
const TBlobId blob_id,
TBlobVersion  version 
) const

◆ SetAndSaveNoBlob()

void CReader::SetAndSaveNoBlob ( CReaderRequestResult result,
const TBlobId blob_id,
TChunkId  chunk_id,
TBlobState  blob_state 
)

◆ SetAndSaveNoSeq_idBlob_ids() [1/3]

void CReader::SetAndSaveNoSeq_idBlob_ids ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const SAnnotSelector sel,
CLoadLockBlobIds lock,
TBlobState  state 
) const

◆ SetAndSaveNoSeq_idBlob_ids() [2/3]

void CReader::SetAndSaveNoSeq_idBlob_ids ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const SAnnotSelector sel,
const CLoadLockGi gi_lock 
) const

◆ SetAndSaveNoSeq_idBlob_ids() [3/3]

void CReader::SetAndSaveNoSeq_idBlob_ids ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const SAnnotSelector sel,
TBlobState  state 
) const

Definition at line 1087 of file reader.cpp.

References result, and SetAndSaveNoSeq_idBlob_ids().

◆ SetAndSaveNoSeq_idSeq_ids() [1/2]

void CReader::SetAndSaveNoSeq_idSeq_ids ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const CLoadLockGi gi_lock 
) const

Definition at line 1193 of file reader.cpp.

References result.

◆ SetAndSaveNoSeq_idSeq_ids() [2/2]

void CReader::SetAndSaveNoSeq_idSeq_ids ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
TState  state 
) const

◆ SetAndSaveSeq_idAccFromSeqIds()

void CReader::SetAndSaveSeq_idAccFromSeqIds ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const CLoadLockSeqIds seq_ids 
) const

Definition at line 1154 of file reader.cpp.

References result.

Referenced by LoadSeq_idAccVer().

◆ SetAndSaveSeq_idAccVer()

void CReader::SetAndSaveSeq_idAccVer ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const TSequenceAcc acc_id 
) const

Definition at line 1246 of file reader.cpp.

References result.

Referenced by CPubseqReader::LoadSeq_idAccVer(), and CId2ReaderBase::x_ProcessGetSeqIdSeqId().

◆ SetAndSaveSeq_idBlob_ids() [1/3]

void CReader::SetAndSaveSeq_idBlob_ids ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const SAnnotSelector sel,
CLoadLockBlobIds lock,
const CFixedBlob_ids blob_ids 
) const

Definition at line 1324 of file reader.cpp.

References result, CLoadLockBlobIds::SetLoadedBlob_ids(), and TRACE_SET.

◆ SetAndSaveSeq_idBlob_ids() [2/3]

void CReader::SetAndSaveSeq_idBlob_ids ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const SAnnotSelector sel,
CLoadLockBlobIds lock,
const CLoadLockBlobIds blob_ids 
) const

◆ SetAndSaveSeq_idBlob_ids() [3/3]

void CReader::SetAndSaveSeq_idBlob_ids ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const SAnnotSelector sel,
const CFixedBlob_ids blob_ids 
) const

Definition at line 1077 of file reader.cpp.

References result, and SetAndSaveSeq_idBlob_ids().

◆ SetAndSaveSeq_idGi()

void CReader::SetAndSaveSeq_idGi ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const TSequenceGi gi 
) const

◆ SetAndSaveSeq_idGiFromSeqIds()

void CReader::SetAndSaveSeq_idGiFromSeqIds ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const CLoadLockSeqIds seq_ids 
) const

Definition at line 1167 of file reader.cpp.

References result.

Referenced by LoadSeq_idGi().

◆ SetAndSaveSeq_idLabel()

void CReader::SetAndSaveSeq_idLabel ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const string label 
) const

Definition at line 1259 of file reader.cpp.

References label, and result.

Referenced by CId2ReaderBase::x_ProcessGetSeqIdSeqId().

◆ SetAndSaveSeq_idLabelFromSeqIds()

void CReader::SetAndSaveSeq_idLabelFromSeqIds ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const CLoadLockSeqIds seq_ids 
) const

Definition at line 1180 of file reader.cpp.

References result.

Referenced by LoadSeq_idLabel().

◆ SetAndSaveSeq_idSeq_ids() [1/2]

void CReader::SetAndSaveSeq_idSeq_ids ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const CFixedSeq_ids seq_ids 
) const

◆ SetAndSaveSeq_idSeq_ids() [2/2]

void CReader::SetAndSaveSeq_idSeq_ids ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const CLoadLockSeqIds seq_ids 
) const

Definition at line 1141 of file reader.cpp.

References result.

◆ SetAndSaveSeq_idTaxId()

void CReader::SetAndSaveSeq_idTaxId ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
TTaxId  taxid 
) const

Definition at line 1272 of file reader.cpp.

References result.

Referenced by LoadSeq_idTaxId(), and CId2ReaderBase::x_ProcessGetSeqIdSeqId().

◆ SetAndSaveSequenceHash()

void CReader::SetAndSaveSequenceHash ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const TSequenceHash hash 
) const

Definition at line 1285 of file reader.cpp.

References result.

Referenced by CPubseqReader::LoadGiHash(), and CId2ReaderBase::x_ProcessGetSeqIdSeqId().

◆ SetAndSaveSequenceLength()

void CReader::SetAndSaveSequenceLength ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
TSeqPos  length 
) const

Definition at line 1298 of file reader.cpp.

References result.

Referenced by LoadSequenceLength(), and CId2ReaderBase::x_ProcessGetSeqIdSeqId().

◆ SetAndSaveSequenceType()

void CReader::SetAndSaveSequenceType ( CReaderRequestResult result,
const CSeq_id_Handle seq_id,
const TSequenceType type 
) const

Definition at line 1311 of file reader.cpp.

References result.

Referenced by LoadSequenceType(), and CId2ReaderBase::x_ProcessGetSeqIdSeqId().

◆ SetIncludeHUP()

void CReader::SetIncludeHUP ( bool  include_hup = true,
const string web_cookie = NcbiEmptyString 
)
virtual

Reimplemented in CPubseq2Reader, and CPubseqReader.

Definition at line 1401 of file reader.cpp.

References NCBI_THROW.

Referenced by CGBDataLoader_Native::x_CreateReaders().

◆ SetMaximumConnections() [1/2]

int CReader::SetMaximumConnections ( int  max)

◆ SetMaximumConnections() [2/2]

void CReader::SetMaximumConnections ( int  max,
int  default_max 
)

Definition at line 219 of file reader.cpp.

References max(), and SetMaximumConnections().

◆ SetMaximumRetryCount()

void CReader::SetMaximumRetryCount ( int  retry_count)

Definition at line 472 of file reader.cpp.

References m_MaximumRetryCount.

Referenced by InitParams().

◆ SetNewConnectionDelayMicroSec()

void CReader::SetNewConnectionDelayMicroSec ( unsigned long  micro_sec)
virtual

◆ SetParams()

void CReader::SetParams ( const CReaderParams params)
virtual

Reimplemented in CId2ReaderBase.

Definition at line 1408 of file reader.cpp.

Referenced by CGBDataLoader_Native::x_CreateReader().

◆ SetPreopenConnection()

void CReader::SetPreopenConnection ( bool  preopen = true)

◆ WaitBeforeNewConnection()

void CReader::WaitBeforeNewConnection ( TConn  conn)
virtual

◆ x_AbortConnection()

void CReader::x_AbortConnection ( TConn  conn,
bool  failed 
)
private

◆ x_AddConnection()

void CReader::x_AddConnection ( void  )
private

◆ x_AddConnectionSlot()

virtual void CReader::x_AddConnectionSlot ( TConn  conn)
protectedpure virtual

◆ x_AllocConnection()

CReader::TConn CReader::x_AllocConnection ( bool  oldest = false)
private

◆ x_ConnectAtSlot()

virtual void CReader::x_ConnectAtSlot ( TConn  conn)
protectedpure virtual

◆ x_DisconnectAtSlot()

void CReader::x_DisconnectAtSlot ( TConn  conn,
bool  failed 
)
protectedvirtual

◆ x_ReleaseClosedConnection()

void CReader::x_ReleaseClosedConnection ( TConn  conn)
private

◆ x_ReleaseConnection()

void CReader::x_ReleaseConnection ( TConn  conn,
double  retry_delay = 0 
)
private

◆ x_RemoveConnection()

void CReader::x_RemoveConnection ( void  )
private

◆ x_RemoveConnectionSlot()

virtual void CReader::x_RemoveConnectionSlot ( TConn  conn)
protectedpure virtual

◆ x_ReportDisconnect()

void CReader::x_ReportDisconnect ( const char *  reader,
const char *  server,
TConn  conn,
bool  failed 
) const
protected

◆ x_SetIncludeHUP()

void CReader::x_SetIncludeHUP ( bool  include_hup)
inlineprotected

Definition at line 368 of file reader.hpp.

References m_IncludeHUP.

Referenced by CPubseqReader::SetIncludeHUP(), and CPubseq2Reader::SetIncludeHUP().

Friends And Related Function Documentation

◆ CReadDispatcher

friend class CReadDispatcher
friend

Definition at line 296 of file reader.hpp.

◆ CReaderAllocatedConnection

friend class CReaderAllocatedConnection
friend

Definition at line 374 of file reader.hpp.

Member Data Documentation

◆ m_ConnectFailCount

atomic<int> CReader::m_ConnectFailCount
private

Definition at line 401 of file reader.hpp.

Referenced by ConnectFailed(), ConnectSucceeds(), and WaitBeforeNewConnection().

◆ m_ConnectionsMutex

CMutex CReader::m_ConnectionsMutex
private

◆ m_Dispatcher

CReadDispatcher* CReader::m_Dispatcher
protected

◆ m_FreeConnections

TFreeConnections CReader::m_FreeConnections
private

Definition at line 397 of file reader.hpp.

Referenced by x_AllocConnection(), x_ReleaseClosedConnection(), and x_ReleaseConnection().

◆ m_IncludeHUP

bool CReader::m_IncludeHUP
private

Definition at line 387 of file reader.hpp.

Referenced by HasHUPIncluded(), and x_SetIncludeHUP().

◆ m_LastTimeFailed

CTime CReader::m_LastTimeFailed
private

Definition at line 402 of file reader.hpp.

Referenced by ConnectFailed().

◆ m_MaxConnections

TConn CReader::m_MaxConnections
private

◆ m_MaximumRetryCount

int CReader::m_MaximumRetryCount
private

Definition at line 400 of file reader.hpp.

Referenced by GetRetryCount(), and SetMaximumRetryCount().

◆ m_NextConnectTime

CTime CReader::m_NextConnectTime
private

Definition at line 403 of file reader.hpp.

Referenced by SetNewConnectionDelayMicroSec(), and WaitBeforeNewConnection().

◆ m_NextNewConnection

TConn CReader::m_NextNewConnection
private

Definition at line 390 of file reader.hpp.

Referenced by x_AddConnection().

◆ m_NumFreeConnections

CSemaphore CReader::m_NumFreeConnections
private

Definition at line 399 of file reader.hpp.

Referenced by x_AllocConnection(), x_ReleaseClosedConnection(), and x_ReleaseConnection().

◆ m_PreopenConnection

bool CReader::m_PreopenConnection
private

Definition at line 386 of file reader.hpp.

Referenced by GetPreopenConnection(), and SetPreopenConnection().

◆ m_WaitTime

CIncreasingTime CReader::m_WaitTime
private

Definition at line 405 of file reader.hpp.

Referenced by InitParams(), and WaitBeforeNewConnection().

◆ m_WaitTimeErrors

int CReader::m_WaitTimeErrors
private

Definition at line 404 of file reader.hpp.

Referenced by InitParams().


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:29 2024 by modify_doxy.py rev. 669887