HCE project C++ developers source code library  1.1.1
HCE project developer library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Aerospike.hpp
Go to the documentation of this file.
1 
15 #ifndef AEROSPIKE_DB_HPP
16 #define AEROSPIKE_DB_HPP
17 
18 
19 #include <string>
20 #include <Poco/URI.h>
21 #include "BaseDB.hpp"
22 
23 #include "citrusleaf/citrusleaf.h"
24 
25 
26 namespace HCE {
27 
28 class AerospikeDB : public BaseDB {
29 public:
30  AerospikeDB();
31  virtual ~AerospikeDB();
32 public:
33  void setDriverUrl( const std::string & dbUrl);
34  void put(const std::string&, const std::string&);
35  std::string get(const std::string&);
36  virtual std::vector<std::string> get_all();
37  void del(const std::string&);
38  inline int getLastError() const { return _error; }
39 private:
40  cl_cluster *_clc;
41 private:
42  enum {TIMEOUT=2000};
43  enum {DEFAULT_DOCUMENT=0};
44  const std::string docs[1] = {"document"};
45  enum {DEFAULT_SET=0};
46  const std::string sets[1] = {"default_set"};
47 };
48 
49 }
50 
51 
52 #endif //AEROSPIKE_DB_HPP