/*
- 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.
limitations under the License.
*/
+/*
+ * This source code is part of the near-RT RIC (RAN Intelligent Controller)
+ * platform project (RICP).
+*/
+
#ifndef SHAREDDATALAYER_DATABASECONFIGURATIONIMPL_HPP_
#define SHAREDDATALAYER_DATABASECONFIGURATIONIMPL_HPP_
void checkAndApplyServerAddress(const std::string& address) override;
- void checkAndApplySentinelAddress(const std::string& address) override;
+ void checkAndApplySentinelPorts(const std::string& sentinelPortsEnvStr) override;
- void checkAndApplySentinelMasterName(const std::string& name) override;
+ void checkAndApplySentinelMasterNames(const std::string& sentinelMasterNamesEnvStr) override;
DatabaseConfiguration::DbType getDbType() const override;
DatabaseConfigurationImpl::Addresses getServerAddresses() const override;
+ DatabaseConfigurationImpl::Addresses getServerAddresses(const boost::optional<std::size_t>& addressIndex) const override;
+
DatabaseConfiguration::Addresses getDefaultServerAddresses() const override;
- boost::optional<HostAndPort> getSentinelAddress() const override;
+ boost::optional<HostAndPort> getSentinelAddress(const boost::optional<std::size_t>& addressIndex) const override;
- std::string getSentinelMasterName() const override;
+ std::string getSentinelMasterName(const boost::optional<std::size_t>& addressIndex) const override;
bool isEmpty() const override;
private:
DbType dbType;
Addresses serverAddresses;
- boost::optional<HostAndPort> sentinelAddress;
- std::string sentinelMasterName;
+ SentinelPorts sentinelPorts;
+ SentinelMasterNames sentinelMasterNames;
};
}