summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoao Eduardo Luis <joao.luis@inktank.com>2013-04-15 23:13:22 +0100
committerJoao Eduardo Luis <joao.luis@inktank.com>2013-04-23 15:58:50 +0100
commitec0d0e67ce80d5c5a09d351b148c1fd23fc33c4b (patch)
tree4ef7df861c09629fd5ce61f69b4874fd21561041
parent66e1845cbdd20019f49345198af51e623a72b38b (diff)
downloadceph-ec0d0e67ce80d5c5a09d351b148c1fd23fc33c4b.tar.gz
mon: MonitorDBStore: allow function override when inheriting the class
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
-rw-r--r--src/mon/MonitorDBStore.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mon/MonitorDBStore.h b/src/mon/MonitorDBStore.h
index 035029ba70e..c3130575391 100644
--- a/src/mon/MonitorDBStore.h
+++ b/src/mon/MonitorDBStore.h
@@ -168,7 +168,7 @@ class MonitorDBStore
}
};
- int apply_transaction(MonitorDBStore::Transaction& t) {
+ virtual int apply_transaction(MonitorDBStore::Transaction& t) {
KeyValueDB::Transaction dbt = db->get_transaction();
for (list<Op>::iterator it = t.ops.begin(); it != t.ops.end(); ++it) {
@@ -367,7 +367,7 @@ class MonitorDBStore
return iter;
}
- int get(const string& prefix, const string& key, bufferlist& bl) {
+ virtual int get(const string& prefix, const string& key, bufferlist& bl) {
set<string> k;
k.insert(key);
map<string,bufferlist> out;
@@ -405,7 +405,7 @@ class MonitorDBStore
return ver;
}
- bool exists(const string& prefix, const string& key) {
+ virtual bool exists(const string& prefix, const string& key) {
KeyValueDB::Iterator it = db->get_iterator(prefix);
int err = it->lower_bound(key);
if (err < 0)
@@ -475,7 +475,7 @@ class MonitorDBStore
MonitorDBStore(LevelDBStore *db_ptr) {
db.reset(db_ptr);
}
- ~MonitorDBStore() { }
+ virtual ~MonitorDBStore() { }
};