X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=include%2Fsdl%2Fsyncstorage.hpp;fp=include%2Fsdl%2Fsyncstorage.hpp;h=80f90d00f53cbc345332dfcfe936582198d7f7a9;hb=63869e10ac4d8572238989e1b582c0314da91f9c;hp=29f1f9a95988ea403aed29058eb393cae730408d;hpb=69b0a71f5fe8825fa45ee9502a41fd8b465c44e0;p=ric-plt%2Fsdl.git diff --git a/include/sdl/syncstorage.hpp b/include/sdl/syncstorage.hpp index 29f1f9a..80f90d0 100644 --- a/include/sdl/syncstorage.hpp +++ b/include/sdl/syncstorage.hpp @@ -267,9 +267,37 @@ namespace shareddatalayer * @throw OperationInterrupted if shareddatalayer does not receive a reply from the backend data storage. * @throw InvalidNamespace if given namespace does not meet the namespace format restrictions. */ + [[deprecated("Use listKeys() instead.")]] virtual Keys findKeys(const Namespace& ns, const std::string& keyPrefix) = 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. + * + * @return Found keys. + * + * @throw BackendError if the backend data storage fails to process the request. + * @throw NotConnected if shareddatalayer is not connected to the backend data storage. + * @throw OperationInterrupted if shareddatalayer does not receive a reply from the backend data storage. + * @throw InvalidNamespace if given namespace does not meet the namespace format restrictions. + */ + virtual Keys listKeys(const Namespace& ns, + const std::string& pattern) = 0; + /** * Remove all keys under the namespace. Found keys are removed atomically, i.e. * either all succeeds or all fails.