X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=include%2Fsdl%2Fasyncstorage.hpp;h=ae1f959730221caeeec29467f1206f184e05b8a7;hb=63869e10ac4d8572238989e1b582c0314da91f9c;hp=c20c7b1707d2118e8f2cdaceb35af8c0a013e645;hpb=ef2bf51d04aaf01fa0cabdcaf905b23423067662;p=ric-plt%2Fsdl.git diff --git a/include/sdl/asyncstorage.hpp b/include/sdl/asyncstorage.hpp index c20c7b1..ae1f959 100644 --- a/include/sdl/asyncstorage.hpp +++ b/include/sdl/asyncstorage.hpp @@ -14,6 +14,11 @@ limitations under the License. */ +/* + * This source code is part of the near-RT RIC (RAN Intelligent Controller) + * platform project (RICP). +*/ + #ifndef SHAREDDATALAYER_ASYNCSTORAGE_HPP_ #define SHAREDDATALAYER_ASYNCSTORAGE_HPP_ @@ -287,7 +292,7 @@ namespace shareddatalayer using FindKeysAck = std::function; /** - * Find all keys matching search pattern under the namespace. No prior knowledge about the keys in the given + * Find all keys matching search key prefix under the namespace. No prior knowledge about the keys in the given * namespace exists, thus operation is not guaranteed to be atomic or isolated. * * @param ns Namespace under which this operation is targeted. @@ -296,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.