X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=include%2Fprivate%2Fdatabaseconfiguration.hpp;h=e8e5b8df8eede28b61349db3f43fb9ff493398e8;hb=69b0a71f5fe8825fa45ee9502a41fd8b465c44e0;hp=fd24a116b01227215d395467852be286d79723f3;hpb=ef2bf51d04aaf01fa0cabdcaf905b23423067662;p=ric-plt%2Fsdl.git diff --git a/include/private/databaseconfiguration.hpp b/include/private/databaseconfiguration.hpp index fd24a11..e8e5b8d 100644 --- a/include/private/databaseconfiguration.hpp +++ b/include/private/databaseconfiguration.hpp @@ -14,11 +14,17 @@ limitations under the License. */ +/* + * This source code is part of the near-RT RIC (RAN Intelligent Controller) + * platform project (RICP). +*/ + #ifndef SHAREDDATALAYER_DATABASECONFIGURATION_HPP_ #define SHAREDDATALAYER_DATABASECONFIGURATION_HPP_ #include #include +#include #include "private/hostandport.hpp" namespace shareddatalayer @@ -32,15 +38,24 @@ namespace shareddatalayer { UNKNOWN = 0, REDIS_STANDALONE, - REDIS_CLUSTER + REDIS_CLUSTER, + REDIS_SENTINEL, + SDL_STANDALONE_CLUSTER, + SDL_SENTINEL_CLUSTER }; virtual ~DatabaseConfiguration() = default; virtual void checkAndApplyDbType(const std::string& type) = 0; virtual void checkAndApplyServerAddress(const std::string& address) = 0; + virtual void checkAndApplySentinelAddress(const std::string& address) = 0; + virtual void checkAndApplySentinelMasterName(const std::string& name) = 0; virtual DatabaseConfiguration::DbType getDbType() const = 0; virtual DatabaseConfiguration::Addresses getServerAddresses() const = 0; + virtual DatabaseConfiguration::Addresses getServerAddresses(const boost::optional& addressIndex) const = 0; virtual DatabaseConfiguration::Addresses getDefaultServerAddresses() const = 0; + virtual boost::optional getSentinelAddress() const = 0; // Optional return value, because empty HostAndPort can't be created. + virtual boost::optional getSentinelAddress(const boost::optional& addressIndex) const = 0; + virtual std::string getSentinelMasterName() const = 0; virtual bool isEmpty() const = 0; DatabaseConfiguration(DatabaseConfiguration&&) = delete;