X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=include%2Fprivate%2Fdatabaseconfiguration.hpp;fp=include%2Fprivate%2Fdatabaseconfiguration.hpp;h=b43aeee9c869c1d9713106f0bd6b139de2f0b552;hb=5bdca62d89d430f607310370fe1391bd1d1bd21a;hp=e8e5b8df8eede28b61349db3f43fb9ff493398e8;hpb=b4e17e19a35bf714f5ae6c1c041e951ed9de10d4;p=ric-plt%2Fsdl.git diff --git a/include/private/databaseconfiguration.hpp b/include/private/databaseconfiguration.hpp index e8e5b8d..b43aeee 100644 --- a/include/private/databaseconfiguration.hpp +++ b/include/private/databaseconfiguration.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2018-2019 Nokia. + Copyright (c) 2018-2022 Nokia. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -34,6 +34,8 @@ namespace shareddatalayer public: class InvalidDbType; using Addresses = std::vector; + using SentinelPorts = std::vector; + using SentinelMasterNames = std::vector; enum class DbType { UNKNOWN = 0, @@ -47,15 +49,14 @@ namespace shareddatalayer 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 void checkAndApplySentinelPorts(const std::string& sentinelPortsEnvStr) = 0; + virtual void checkAndApplySentinelMasterNames(const std::string& sentinelMasterNamesEnvStr) = 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 std::string getSentinelMasterName(const boost::optional& addressIndex) const = 0; virtual bool isEmpty() const = 0; DatabaseConfiguration(DatabaseConfiguration&&) = delete;