hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DataBaseDriverConfig.hpp
Go to the documentation of this file.
1 
13 #ifndef DATA_BASE_DRIVER_CONFIG_HPP
14 #define DATA_BASE_DRIVER_CONFIG_HPP
15 
19 #include <iostream>
20 
21 #ifdef _USE_VOLDEMORT_DB_
22  #include "Voldemort.hpp"
23 #elif _USE_LEVEL_DB_
24  #include "LevelDB.hpp"
25 #elif _USE_AEROSPIKE_DB_
26  #include "Aerospike.hpp"
27 #endif
28 
29 namespace HCE {
30 
31 //<!
32 //<! class which contains data for connection with data base (voldemort, and so on..)
33 //<!
34 
36 public:
39 private:
40  static std::string driverName;
41 private:
42  std::string _driverName;
43  std::string _dbName;
44  std::string _dbUrl;
45  bool _writePolicy;
46  bool _writeUnique;
47 public:
48  void setDriverName (const std::string& driverName) { this->_driverName = driverName; }
49  void setDataBaseName (const std::string& dbName) { this->_dbName = dbName; }
50  void setDataBaseUrl (const std::string& dbUrl) { this->_dbUrl = dbUrl; }
51  void setWritePolicy(const bool write_policy) {this->_writePolicy = write_policy;}
52  void setWriteUnique (const bool write_unique) { this->_writeUnique = write_unique; }
53 public:
54  std::string getDriverName() const { return this->_driverName; }
55  std::string getDataBaseName() const { return this->_dbName; }
56  std::string getDataBaseUrl() const { return this->_dbUrl; }
57  const bool getWritePolicy() const { return this->_writePolicy; }
58  const bool getWriteUnique() const { return this->_writeUnique; }
59 };
60 
61 }
62 
63 #endif