NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
CCassNAnnotTaskFetch Class Reference

Search Toolkit Book for CCassNAnnotTaskFetch

#include <objtools/pubseq_gateway/impl/cassandra/nannot_task/fetch.hpp>

+ Inheritance diagram for CCassNAnnotTaskFetch:
+ Collaboration diagram for CCassNAnnotTaskFetch:

Public Member Functions

 CCassNAnnotTaskFetch (shared_ptr< CCassConnection > connection, const string &keyspace, string accession, int16_t version, int16_t seq_id_type, const vector< string > &annot_names, TNAnnotConsumeCallback consume_callback, TDataErrorCallback data_error_cb)
 
 CCassNAnnotTaskFetch (shared_ptr< CCassConnection > connection, const string &keyspace, string accession, int16_t version, int16_t seq_id_type, const vector< CTempString > &annot_names, TNAnnotConsumeCallback consume_callback, TDataErrorCallback data_error_cb)
 
 CCassNAnnotTaskFetch (shared_ptr< CCassConnection > connection, const string &keyspace, string accession, int16_t version, int16_t seq_id_type, TNAnnotConsumeCallback consume_callback, TDataErrorCallback data_error_cb)
 
void SetDataReadyCB (shared_ptr< CCassDataCallbackReceiver > callback)
 
void SetConsumeCallback (TNAnnotConsumeCallback callback)
 
string GetAccession () const
 
int16_t GetVersion () const
 
int16_t GetSeqIdType () const
 
vector< stringGetAnnotNames () const
 
- Public Member Functions inherited from CCassBlobWaiter
 CCassBlobWaiter (const CCassBlobWaiter &)=delete
 
CCassBlobWaiteroperator= (const CCassBlobWaiter &)=delete
 
 CCassBlobWaiter (CCassBlobWaiter &&)=delete
 
CCassBlobWaiteroperator= (CCassBlobWaiter &&)=delete
 
 CCassBlobWaiter (shared_ptr< CCassConnection > conn, const string &keyspace, int32_t key, bool async, TDataErrorCallback error_cb)
 
 CCassBlobWaiter (shared_ptr< CCassConnection > conn, const string &keyspace, bool async, TDataErrorCallback error_cb)
 
virtual void SetQueryTimeout (std::chrono::milliseconds value)
 
virtual std::chrono::milliseconds GetQueryTimeout () const
 
virtual ~CCassBlobWaiter ()
 
bool Cancelled () const
 
virtual void Cancel ()
 
bool Wait ()
 
bool HasError () const
 
string LastError () const
 
void ClearError ()
 
string GetKeySpace () const
 
void SetKeySpace (string const &keyspace)
 
int32_t GetKey () const
 
void SetErrorCB (TDataErrorCallback error_cb)
 
void SetMaxRetries (int value)
 Set connection point parameters. More...
 
int GetMaxRetries () const
 
void SetDataReadyCB3 (shared_ptr< CCassDataCallbackReceiver > datareadycb3)
 

Protected Member Functions

void Wait1 () override
 
- Protected Member Functions inherited from CCassBlobWaiter
void CloseAll (void)
 
void SetupQueryCB3 (shared_ptr< CCassQuery > &query)
 
bool IsDataReadyCallbackExpired () const
 
void Error (CRequestStatus::ECode status, int code, EDiagSev severity, const string &message)
 
bool CanRestart (shared_ptr< CCassQuery > query, unsigned int restart_count) const
 
shared_ptr< CCassQueryProduceQuery () const
 
bool CanRestart (SQueryRec &it) const
 
bool CheckReady (shared_ptr< CCassQuery > qry, unsigned int restart_counter, bool &need_repeat)
 
bool CheckReady (SQueryRec &it)
 
CassConsistency GetQueryConsistency (void)
 
bool CheckMaxActive ()
 CCassBlobWaiter. More...
 

Protected Attributes

unsigned int m_PageSize {CCassQuery::DEFAULT_PAGE_SIZE}
 
unsigned int m_RestartCounter {0}
 
- Protected Attributes inherited from CCassBlobWaiter
TDataErrorCallback m_ErrorCb
 
weak_ptr< CCassDataCallbackReceiverm_DataReadyCb3
 
shared_ptr< CCassConnectionm_Conn
 
std::chrono::milliseconds m_QueryTimeout {0}
 
atomic< int32_tm_State {eInit}
 
string m_LastError
 
bool m_Async
 
atomic_bool m_Cancelled {false}
 
vector< SQueryRecm_QueryArr
 

Private Types

enum  EBlobFetchState { eInit = 0 , eFetchStarted , eDone = CCassBlobWaiter::eDone , eError = CCassBlobWaiter::eError }
 

Private Member Functions

size_t x_AnnotNamesSize () const
 
size_t x_AnnotNamesCount (string const &more) const
 
void x_AnnotNamesBind (shared_ptr< CCassQuery > &query, string const &more, unsigned int first) const
 

Private Attributes

string m_Accession
 
int16_t m_Version {-1}
 
int16_t m_SeqIdType {-1}
 
vector< stringm_AnnotNames
 
vector< CTempStringm_AnnotNamesTemp
 
TNAnnotConsumeCallback m_Consume {nullptr}
 
string m_LastConsumedAnnot
 

Additional Inherited Members

- Protected Types inherited from CCassBlobWaiter
enum  EBlobWaiterState { eInit = 0 , eDone = 10000 , eError = -1 }
 

Detailed Description

Definition at line 51 of file fetch.hpp.

Member Enumeration Documentation

◆ EBlobFetchState

Enumerator
eInit 
eFetchStarted 
eDone 
eError 

Definition at line 54 of file fetch.hpp.

Constructor & Destructor Documentation

◆ CCassNAnnotTaskFetch() [1/3]

CCassNAnnotTaskFetch::CCassNAnnotTaskFetch ( shared_ptr< CCassConnection connection,
const string keyspace,
string  accession,
int16_t  version,
int16_t  seq_id_type,
const vector< string > &  annot_names,
TNAnnotConsumeCallback  consume_callback,
TDataErrorCallback  data_error_cb 
)

Definition at line 51 of file fetch.cpp.

◆ CCassNAnnotTaskFetch() [2/3]

CCassNAnnotTaskFetch::CCassNAnnotTaskFetch ( shared_ptr< CCassConnection connection,
const string keyspace,
string  accession,
int16_t  version,
int16_t  seq_id_type,
const vector< CTempString > &  annot_names,
TNAnnotConsumeCallback  consume_callback,
TDataErrorCallback  data_error_cb 
)

Definition at line 69 of file fetch.cpp.

◆ CCassNAnnotTaskFetch() [3/3]

CCassNAnnotTaskFetch::CCassNAnnotTaskFetch ( shared_ptr< CCassConnection connection,
const string keyspace,
string  accession,
int16_t  version,
int16_t  seq_id_type,
TNAnnotConsumeCallback  consume_callback,
TDataErrorCallback  data_error_cb 
)

Definition at line 87 of file fetch.cpp.

Member Function Documentation

◆ GetAccession()

string CCassNAnnotTaskFetch::GetAccession ( void  ) const
inline

Definition at line 97 of file fetch.hpp.

References m_Accession.

Referenced by ToJsonString().

◆ GetAnnotNames()

vector<string> CCassNAnnotTaskFetch::GetAnnotNames ( void  ) const
inline

Definition at line 112 of file fetch.hpp.

References m_AnnotNames, m_AnnotNamesTemp, and result.

Referenced by ToJsonString().

◆ GetSeqIdType()

int16_t CCassNAnnotTaskFetch::GetSeqIdType ( ) const
inline

Definition at line 107 of file fetch.hpp.

References m_SeqIdType.

Referenced by ToJsonString().

◆ GetVersion()

int16_t CCassNAnnotTaskFetch::GetVersion ( void  ) const
inline

Definition at line 102 of file fetch.hpp.

References m_Version.

Referenced by ToJsonString().

◆ SetConsumeCallback()

void CCassNAnnotTaskFetch::SetConsumeCallback ( TNAnnotConsumeCallback  callback)

◆ SetDataReadyCB()

void CCassNAnnotTaskFetch::SetDataReadyCB ( shared_ptr< CCassDataCallbackReceiver callback)

◆ Wait1()

void CCassNAnnotTaskFetch::Wait1 ( )
overrideprotectedvirtual

◆ x_AnnotNamesBind()

void CCassNAnnotTaskFetch::x_AnnotNamesBind ( shared_ptr< CCassQuery > &  query,
string const more,
unsigned int  first 
) const
private

Definition at line 147 of file fetch.cpp.

References assert, first(), m_AnnotNames, m_AnnotNamesTemp, query, t, and val.

Referenced by Wait1().

◆ x_AnnotNamesCount()

size_t CCassNAnnotTaskFetch::x_AnnotNamesCount ( string const more) const
private

Definition at line 128 of file fetch.cpp.

References assert, m_AnnotNames, m_AnnotNamesTemp, t, and val.

Referenced by Wait1().

◆ x_AnnotNamesSize()

size_t CCassNAnnotTaskFetch::x_AnnotNamesSize ( ) const
private

Definition at line 118 of file fetch.cpp.

References assert, m_AnnotNames, and m_AnnotNamesTemp.

Referenced by Wait1().

Member Data Documentation

◆ m_Accession

string CCassNAnnotTaskFetch::m_Accession
private

Definition at line 133 of file fetch.hpp.

Referenced by GetAccession(), and Wait1().

◆ m_AnnotNames

vector<string> CCassNAnnotTaskFetch::m_AnnotNames
private

Definition at line 136 of file fetch.hpp.

Referenced by GetAnnotNames(), x_AnnotNamesBind(), x_AnnotNamesCount(), and x_AnnotNamesSize().

◆ m_AnnotNamesTemp

vector<CTempString> CCassNAnnotTaskFetch::m_AnnotNamesTemp
private

Definition at line 137 of file fetch.hpp.

Referenced by GetAnnotNames(), x_AnnotNamesBind(), x_AnnotNamesCount(), and x_AnnotNamesSize().

◆ m_Consume

TNAnnotConsumeCallback CCassNAnnotTaskFetch::m_Consume {nullptr}
private

Definition at line 138 of file fetch.hpp.

Referenced by SetConsumeCallback(), and Wait1().

◆ m_LastConsumedAnnot

string CCassNAnnotTaskFetch::m_LastConsumedAnnot
private

Definition at line 139 of file fetch.hpp.

Referenced by Wait1().

◆ m_PageSize

unsigned int CCassNAnnotTaskFetch::m_PageSize {CCassQuery::DEFAULT_PAGE_SIZE}
protected

Definition at line 141 of file fetch.hpp.

Referenced by Wait1().

◆ m_RestartCounter

unsigned int CCassNAnnotTaskFetch::m_RestartCounter {0}
protected

Definition at line 142 of file fetch.hpp.

Referenced by Wait1().

◆ m_SeqIdType

int16_t CCassNAnnotTaskFetch::m_SeqIdType {-1}
private

Definition at line 135 of file fetch.hpp.

Referenced by GetSeqIdType(), and Wait1().

◆ m_Version

int16_t CCassNAnnotTaskFetch::m_Version {-1}
private

Definition at line 134 of file fetch.hpp.

Referenced by GetVersion(), and Wait1().


The documentation for this class was generated from the following files:
Modified on Sun Mar 03 03:15:31 2024 by modify_doxy.py rev. 669887