From: Sage Weil Date: Tue, 17 Feb 2015 19:29:35 +0000 (-0800) Subject: os/KeyValueDB: add sipler get() variant X-Git-Tag: v9.1.0~324^2~40 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e69ac3a7b00d01b7c20e9c32bcfd857f32871870;p=ceph.git os/KeyValueDB: add sipler get() variant Signed-off-by: Sage Weil --- diff --git a/src/os/KeyValueDB.h b/src/os/KeyValueDB.h index a49c49bc9684..80fdceca8165 100644 --- a/src/os/KeyValueDB.h +++ b/src/os/KeyValueDB.h @@ -86,6 +86,16 @@ public: const std::set &key, ///< [in] Key to retrieve std::map *out ///< [out] Key value retrieved ) = 0; + virtual int get(const string &prefix, ///< [in] prefix + const string &key, ///< [in] key + bufferlist *value) { ///< [out] value + set ks; + ks.insert(key); + map om; + int r = get(prefix, ks, &om); + *value = om[key]; + return r; + } class WholeSpaceIteratorImpl { public: