NCBI C++ ToolKit
fetch.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef OBJTOOLS__PUBSEQ_GATEWAY__CASSANDRA__SI2CSI_TASK__FETCH_HPP_
2 #define OBJTOOLS__PUBSEQ_GATEWAY__CASSANDRA__SI2CSI_TASK__FETCH_HPP_
3 
4 /* $Id: fetch.hpp 97228 2022-06-28 14:10:54Z saprykin $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Sergey Satskiy
30  *
31  * File Description:
32  *
33  * Cassandra select from SI2CSI
34  *
35  */
36 
37 #include <functional>
38 #include <string>
39 #include <memory>
40 #include <vector>
41 
42 #include <corelib/ncbistr.hpp>
43 
48 
51 
53 {
59  };
60 
61  public:
62  CCassSI2CSITaskFetch(shared_ptr<CCassConnection> connection,
63  const string & keyspace,
64  CSi2CsiFetchRequest const& request,
65  TSI2CSIConsumeCallback consume_callback,
66  TDataErrorCallback data_error_cb);
67 
68  void SetDataReadyCB(shared_ptr<CCassDataCallbackReceiver> callback);
70 
71  protected:
72  void Wait1() override;
73 
74  private:
75  void x_InitializeQuery();
76 
79  vector<CSI2CSIRecord> m_Records;
80 
81  protected:
83  unsigned int m_RestartCounter{0};
84 };
85 
87 
88 #endif // OBJTOOLS__PUBSEQ_GATEWAY__CASSANDRA__SI2CSI_TASK__FETCH_HPP_
#define END_IDBLOB_SCOPE
Definition: IdCassScope.hpp:40
#define BEGIN_IDBLOB_SCOPE
Definition: IdCassScope.hpp:39
function< void(CRequestStatus::ECode status, int code, EDiagSev severity, const string &message)> TDataErrorCallback
static const unsigned int DEFAULT_PAGE_SIZE
TSI2CSIConsumeCallback m_ConsumeCallback
Definition: fetch.hpp:78
unsigned int m_RestartCounter
Definition: fetch.hpp:83
CCassSI2CSITaskFetch(shared_ptr< CCassConnection > connection, const string &keyspace, CSi2CsiFetchRequest const &request, TSI2CSIConsumeCallback consume_callback, TDataErrorCallback data_error_cb)
Definition: fetch.cpp:55
void SetDataReadyCB(shared_ptr< CCassDataCallbackReceiver > callback)
Definition: fetch.cpp:71
vector< CSI2CSIRecord > m_Records
Definition: fetch.hpp:79
void Wait1() override
Definition: fetch.cpp:100
void SetConsumeCallback(TSI2CSIConsumeCallback callback)
Definition: fetch.cpp:66
unsigned int m_PageSize
Definition: fetch.hpp:82
void x_InitializeQuery()
Definition: fetch.cpp:80
CSi2CsiFetchRequest m_Request
Definition: fetch.hpp:77
The NCBI C++ standard methods for dealing with std::string.
BEGIN_IDBLOB_SCOPE USING_NCBI_SCOPE
Definition: fetch.hpp:49
function< void(vector< CSI2CSIRecord > &&)> TSI2CSIConsumeCallback
Definition: record.hpp:180
Modified on Thu Apr 25 08:18:05 2024 by modify_doxy.py rev. 669887