Senzing C++ SDK
C++ SDK for Senzing v4, patterned after the official C# SDK
Loading...
Searching...
No Matches
SzCoreDiagnostic.hpp
Go to the documentation of this file.
1// SzCoreDiagnostic.hpp -- native-backed SzDiagnostic implementation.
2//
3// Ports core/SzCoreDiagnostic.cs. Owns the native SzDiagnostic_* module,
4// initialized with the owning environment's settings. Constructed and
5// lifecycle-managed by SzCoreEnvironment (obtain via GetDiagnostic).
6#ifndef SENZING_SDK_CORE_SZCOREDIAGNOSTIC_HPP
7#define SENZING_SDK_CORE_SZCOREDIAGNOSTIC_HPP
8
9#include <cstdint>
10#include <mutex>
11#include <string>
12
14
15namespace senzing::sdk::core {
16
17class SzCoreEnvironment;
18
21class SzCoreDiagnostic final : public SzDiagnostic {
22public:
26 ~SzCoreDiagnostic() override = default;
27
30
31 std::string GetRepositoryInfo() override;
32 std::string CheckRepositoryPerformance(int32_t secondsToRun) override;
33 void PurgeRepository() override;
34 std::string GetFeature(int64_t featureID) override;
35
38 void Destroy();
39
41 [[nodiscard]] bool IsDestroyed();
42
43private:
45 std::mutex monitor_;
46 bool destroyed_{false};
47};
48
49} // namespace senzing::sdk::core
50
51#endif // SENZING_SDK_CORE_SZCOREDIAGNOSTIC_HPP
Diagnostic operations against the Senzing repository.
Definition SzDiagnostic.hpp:11
Core implementation of SzDiagnostic backed by the native SzDiagnostic_* module.
Definition SzCoreDiagnostic.hpp:21
bool IsDestroyed()
True once the native module has been destroyed.
void PurgeRepository() override
Purges all records from the repository. Irreversible.
void Destroy()
Destroys the native diagnostic module.
std::string GetFeature(int64_t featureID) override
Returns JSON describing the feature identified by featureID.
SzCoreDiagnostic(const SzCoreDiagnostic &)=delete
std::string CheckRepositoryPerformance(int32_t secondsToRun) override
Runs a timed repository performance check for secondsToRun seconds and returns the resulting JSON.
SzCoreDiagnostic & operator=(const SzCoreDiagnostic &)=delete
SzCoreDiagnostic(SzCoreEnvironment &env)
Constructs and initializes the native diagnostic module using the owning environment's settings.
std::string GetRepositoryInfo() override
Returns JSON describing the repository (datastore) configuration/state.
Core implementation of SzEnvironment backed by the native libSz modules.
Definition SzCoreEnvironment.hpp:29
Definition SzCoreConfig.hpp:20