]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- |
2 | // vim: ts=8 sw=2 smarttab | |
3 | ||
4 | #include "KeyValueDB.h" | |
7c673cae | 5 | #include "RocksDBStore.h" |
f67539c2 TL |
6 | |
7 | using std::map; | |
8 | using std::string; | |
7c673cae FG |
9 | |
10 | KeyValueDB *KeyValueDB::create(CephContext *cct, const string& type, | |
11 | const string& dir, | |
11fdf7f2 | 12 | map<string,string> options, |
7c673cae FG |
13 | void *p) |
14 | { | |
7c673cae | 15 | if (type == "rocksdb") { |
11fdf7f2 | 16 | return new RocksDBStore(cct, dir, options, p); |
7c673cae | 17 | } |
7c673cae FG |
18 | return NULL; |
19 | } | |
20 | ||
21 | int KeyValueDB::test_init(const string& type, const string& dir) | |
22 | { | |
7c673cae FG |
23 | if (type == "rocksdb") { |
24 | return RocksDBStore::_test_init(dir); | |
25 | } | |
7c673cae FG |
26 | return -EINVAL; |
27 | } |