X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=include%2Fsdl%2Fasyncstorage.hpp;fp=include%2Fsdl%2Fasyncstorage.hpp;h=ae1f959730221caeeec29467f1206f184e05b8a7;hb=63869e10ac4d8572238989e1b582c0314da91f9c;hp=5c3cc6d8926d197bf04baa421f679b76f539e065;hpb=69b0a71f5fe8825fa45ee9502a41fd8b465c44e0;p=ric-plt%2Fsdl.git diff --git a/include/sdl/asyncstorage.hpp b/include/sdl/asyncstorage.hpp index 5c3cc6d..ae1f959 100644 --- a/include/sdl/asyncstorage.hpp +++ b/include/sdl/asyncstorage.hpp @@ -301,10 +301,34 @@ namespace shareddatalayer * @param findKeysAck The acknowledgement to be called once the request has been handled. * The given function is called in the context of handleEvents() function. */ + [[deprecated("Use listKeys() instead.")]] virtual void findKeysAsync(const Namespace& ns, const std::string& keyPrefix, const FindKeysAck& findKeysAck) = 0; + /** + * List all keys matching search glob-style pattern under the namespace. + * + * Supported glob-style patterns: + * h?llo matches hello, hallo and hxllo + * h*llo matches hllo and heeeello + * h[ae]llo matches hello and hallo, but not hillo + * h[^e]llo matches hallo, hbllo, ... but not hello + * h[a-b]llo matches hallo and hbllo + * + * The \ escapes character(s) in key search pattern and those will be treated as a normal + * character(s): + * h\[?llo\* matches h[ello* and h[allo* + * + * @param ns Namespace under which this operation is targeted. + * @param pattern Find keys matching a given glob-style pattern. + * @param findKeysAck The acknowledgement to be called once the request has been handled. + * The given function is called in the context of handleEvents() function. + */ + virtual void listKeys(const Namespace& ns, + const std::string& pattern, + const FindKeysAck& findKeysAck) = 0; + /** * Remove all keys under the namespace. Found keys are removed atomically, i.e. * either all succeeds or all fails.