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=409207f29537ae10f2d5f8d2b8c7ed299611bc1c;hb=faf9fc79e58fa4ace9b0ef317b741afb2c1a8abe;hp=684690bf7c69038aa400039dd0505d37ba094778;hpb=6e77ef4f748bdfa40505fc11c0a190e7a40fdb46;p=ric-plt%2Fsdl.git diff --git a/include/sdl/syncstorage.hpp b/include/sdl/syncstorage.hpp index 684690b..409207f 100644 --- a/include/sdl/syncstorage.hpp +++ b/include/sdl/syncstorage.hpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -249,6 +250,21 @@ namespace shareddatalayer */ virtual void removeAll(const Namespace& ns) = 0; + /** + * Set a timeout value for the synchronous SDL read, write and remove operations. + * By default synchronous read, write and remove operations do not have any timeout + * for the backend data storage readiness, operations are pending interminable to + * finish until backend is ready. With this API function default behaviour can be + * changed and when a timeout happens, an error exception is risen for the SDL + * operation in question. To avoid unnecessary timeout failure due to a temporal + * connection issue, it is recommended not to set too short timeout value. + * Reasonable timeout value is 5 seconds or bigger value. On a side note, timeout + * value 0 means interminable pending time. + * + * @param timeout Timeout value to set. + */ + virtual void setOperationTimeout(const std::chrono::steady_clock::duration& timeout) = 0; + /** * Create a new instance of SyncStorage. *