13#ifndef RTCTK_COMPONENTFRAMEWORK_PERSISTENTREPOADAPTER_HPP
14#define RTCTK_COMPONENTFRAMEWORK_PERSISTENTREPOADAPTER_HPP
24#include <unordered_map>
27#include <mal/utility/Uri.hpp>
57 inline static const std::string SUPPORTED_URI_SCHEME =
"cii.config";
76 const elt::mal::Uri& uri,
77 const std::string& message);
123 return m_path_mapper.GetBaseUri();
134 return m_fits_write_threshold;
142 m_fits_write_threshold = value;
146 template <
typename T>
149 template <
typename T>
152 template <
typename T>
155 template <
typename T>
158 template <
typename T>
169 BatchResponse ProcessRequests(
const RequestList& requests)
override;
193 template <
typename T>
194 static void CheckBufferAndDataPointTypesMatch(
const std::type_info& type,
const T* node);
196 log4cplus::Logger& m_logger;
202 std::atomic<uint64_t> m_fits_write_threshold;
208 mutable std::mutex m_mutex;
213 RTCTK_LOCAL static const std::type_info& LookupCppType(
const std::string& tag);
216 RTCTK_LOCAL static std::tuple<std::string, std::string, bool>
217 LookupYamlTags(
const MetaData& metadata);
219 using TagToTypeMap = std::unordered_map<std::string, const std::type_info&>;
220 using TypeToTagMap = std::unordered_map<std::type_index, std::pair<std::string, std::string>>;
223 static const TagToTypeMap S_TAG_TO_TYPE;
226 static const TypeToTagMap S_TYPE_TO_TAG;
228 template <
typename T>
This class provides a wrapper for a data point path.
Definition dataPointPath.hpp:74
Used to calculate URIs from datapoint paths.
Definition pathMapper.hpp:33
Exception indicating that validation checks of a CII configuration document failed.
Definition persistentRepoAdapter.hpp:72
Exception indicating a datapoint path does not exist.
Definition persistentRepoAdapter.hpp:83
Exception indicating a general CII configuration service error.
Definition persistentRepoAdapter.hpp:64
Implements the Persistent Configuration Repository adapter that uses the CII configuration service as...
Definition persistentRepoAdapter.hpp:55
PersistentRepoAdapter()=delete
Do not allow construction with no arguments.
PersistentRepoAdapter & operator=(PersistentRepoAdapter &&)=default
Objects of this class can be moved with the move assignment operator.
PersistentRepoAdapter & operator=(const PersistentRepoAdapter &)=delete
This class cannot be copy assigned.
PersistentRepoAdapter(const PersistentRepoAdapter &)=delete
This class cannot be copy constructed.
elt::mal::Uri GetBaseUri() const
Get the base URI used when creating this adapter object.
Definition persistentRepoAdapter.hpp:122
uint64_t GetFitsWriteThreshold() const
Return the number of elements above which matrices and vectors are written to FITS files.
Definition persistentRepoAdapter.hpp:133
PersistentRepoAdapter(PersistentRepoAdapter &&)=default
Objects of this class can be moved.
void SetFitsWriteThreshold(uint64_t value)
Set the number of elements above which matrices and vectors are written to FITS files.
Definition persistentRepoAdapter.hpp:141
virtual ~PersistentRepoAdapter()=default
Base interface for all Persistent Configuration Repository adapters.
Definition persistentRepoIf.hpp:25
Definition requestDispatcher.hpp:37
Definition requestDispatcher.hpp:31
The RtctkException class is the base class for all Rtctk exceptions.
Definition exceptions.hpp:211
#define RTCTK_LOCAL
Helper to hide a class or function from the public symbol table.
Definition config.hpp:60
#define RTCTK_API
Helper to indicate that a class or function must be exported in the public symbol table.
Definition config.hpp:33
Provides macros and utilities for exception handling.
Logging Support Library based on log4cplus.
Definition commandReplier.cpp:22
RepositoryIf::PathList PathList
Definition oldbAdapterLegacy.cpp:322
Header file declaring PathMapper.
Header file for PersistentRepoIf, which defines the API for PersistentRepoAdapter.
Header file for the RequestDispatcher utility class.
Definition repositoryIf.ipp:36
Definition repositoryIf.ipp:118
Definition repositoryIf.ipp:44
Definition repositoryIf.ipp:49
Definition repositoryIf.ipp:55
Definition repositoryIf.ipp:86
Definition repositoryIf.ipp:97
Definition repositoryIf.ipp:63
Definition repositoryIf.ipp:124
Definition repositoryIf.ipp:77