1 #ifndef READER__HPP_INCLUDED
2 #define READER__HPP_INCLUDED
84 void InitParams(
CConfig& conf,
const string& driver_name,
85 int default_max_conn);
123 typedef vector<CSeq_id_Handle>
TIds;
264 const string&
label)
const;
277 int SetMaximumConnections(
int max);
278 void SetMaximumConnections(
int max,
int default_max);
279 int GetMaximumConnections(
void)
const;
280 virtual int GetMaximumConnectionsLimit(
void)
const;
282 void SetPreopenConnection(
bool preopen =
true);
283 bool GetPreopenConnection(
void)
const;
284 void OpenInitialConnection(
bool force);
289 virtual int GetConst(
const string& const_name)
const;
291 void SetMaximumRetryCount(
int retry_count);
292 virtual int GetRetryCount(
void)
const;
293 virtual bool MayBeSkippedOnErrors(
void)
const;
302 virtual void ResetCache(
void);
305 virtual void WaitBeforeNewConnection(
TConn conn);
306 virtual void ConnectSucceeds(
TConn conn);
308 virtual void SetNewConnectionDelayMicroSec(
unsigned long micro_sec);
310 virtual void SetIncludeHUP(
bool include_hup =
true,
366 void x_ReportDisconnect(
const char* reader,
const char* server,
370 m_IncludeHUP = include_hup;
376 TConn x_AllocConnection(
bool oldest =
false);
377 void x_ReleaseConnection(
TConn conn,
double retry_delay = 0);
378 void x_ReleaseClosedConnection(
TConn conn);
381 void x_AddConnection(
void);
382 void x_RemoveConnection(
void);
431 return m_Result != 0;
void operator=(CReaderAllocatedConnection &)
CReaderAllocatedConnection(const CReaderAllocatedConnection &)
CReaderRequestResult * m_Result
bool IsAllocated(void) const
bool GetEnableSNP(void) const
void SetEnableCDD(CNullable< bool > enable)
bool GetEnableCDD(void) const
CNullable< bool > m_EnableWGS
CNullable< bool > m_EnableCDD
bool GetEnableWGS(void) const
bool IsSetEnableCDD(void) const
void SetEnableWGS(CNullable< bool > enable)
CNullable< bool > m_EnableSNP
void SetEnableSNP(CNullable< bool > enable)
bool IsSetEnableSNP(void) const
void SetEnableWGS(bool enable)
void SetEnableSNP(bool enable)
bool IsSetEnableWGS(void) const
void SetEnableCDD(bool enable)
friend CDebugPrinter & operator<<(CDebugPrinter &pr, const T &obj)
virtual bool LoadSeq_idSeq_ids(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)=0
CDataLoader::STypeFound TSequenceType
CSemaphore m_NumFreeConnections
vector< CSeq_id_Handle > TSeqIds
CReadDispatcher * m_Dispatcher
CReaderAllocatedConnection CConn
virtual void x_ConnectAtSlot(TConn conn)=0
vector< CBlob_Info > TBlobIds
TFreeConnections m_FreeConnections
void operator=(const CReader &)
CIncreasingTime m_WaitTime
void x_SetIncludeHUP(bool include_hup)
virtual bool LoadBlob(CReaderRequestResult &result, const CBlob_id &blob_id)=0
atomic< int > m_ConnectFailCount
TConn m_NextNewConnection
vector< TSeqPos > TLengths
vector< pair< TBlobId, TChunkIds > > TBlobChunkIds
vector< CSeq_inst::EMol > TTypes
vector< CSeq_id_Handle > TIds
CDataLoader::SAccVerFound TSequenceAcc
CDataLoader::SHashFound TSequenceHash
virtual bool LoadBlobState(CReaderRequestResult &result, const TBlobId &blob_id)=0
virtual void x_AddConnectionSlot(TConn conn)=0
list< SConnSlot > TFreeConnections
bool HasHUPIncluded() const
vector< TChunkId > TChunkIds
virtual bool LoadBlobVersion(CReaderRequestResult &result, const TBlobId &blob_id)=0
CMutex m_ConnectionsMutex
vector< CBlob_id > TPlainBlobIds
virtual void x_RemoveConnectionSlot(TConn conn)=0
CDataLoader::SGiFound TSequenceGi
definition of a Culling tree
static CS_CONNECTION * conn
bool IsNull(void) const
Check if the object is unassigned.
unsigned int TSeqPos
Type for sequence locations and lengths.
SStrictId_Tax::TId TTaxId
Taxon id type.
const TValue & GetValue(void) const
Get a const reference to the current value.
#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.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
virtual void SetParams()
Called at the beginning of Run, before creating thread pool.
#define NCBI_XREADER_EXPORT
static const char label[]
Interfaces for a local cache of versioned binary large objects (BLOBS).
const string version
version string
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.
CReader::CDebugPrinter CDebugPrinter
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,...