diff options
author | Joao Eduardo Luis <joao.luis@inktank.com> | 2013-04-15 23:13:22 +0100 |
---|---|---|
committer | Joao Eduardo Luis <joao.luis@inktank.com> | 2013-04-18 00:01:24 +0100 |
commit | b0aec79811575988d9f29b6e62603ec9da682a55 (patch) | |
tree | 5c64956aa34157f6da44394cddff6008afa465f5 | |
parent | 68bdc86125bcfe5c96eb4dd741137350b8508e22 (diff) | |
download | ceph-b0aec79811575988d9f29b6e62603ec9da682a55.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.h | 8 |
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() { } }; |