12 #include <boost/shared_ptr.hpp>
17 using boost::shared_ptr;
25 virtual ~Backend() {};
27 virtual bool Put(const string &key,
28 const string &value) = 0;
30 virtual bool Get(const string &key,
35 class MemoryBackend : public Backend
38 virtual ~MemoryBackend();
40 virtual bool Put(const string &key,
43 virtual bool Get(const string &key,
48 typedef map<string, string> map_t;
52 class BDBBackend : public Backend
55 BDBBackend(const vector<string> &paths,
57 bool log_in_memory = false);
59 virtual ~BDBBackend();
60 virtual bool Put(const string &key,
63 virtual bool Get(const string &key,
69 inline size_t LookupKeyDB(const string &key);
71 vector< shared_ptr<BDBDatabase> > _dbs;
74 } // namespace kvstore