2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-01 06:25:34 +00:00

[4489] Added support for read only mode in PostgreSQL HR backend.

This commit is contained in:
Marcin Siodelski
2016-07-28 16:21:42 +02:00
parent ef05ff339c
commit 4e0e41f060
4 changed files with 145 additions and 69 deletions

View File

@@ -8,8 +8,10 @@
#define PGSQL_HOST_DATA_SOURCE_H
#include <dhcpsrv/base_host_data_source.h>
#include <dhcpsrv/db_exceptions.h>
#include <dhcpsrv/pgsql_connection.h>
#include <dhcpsrv/pgsql_exchange.h>
#include <util/pointer_util.h>
namespace isc {
namespace dhcp {
@@ -273,10 +275,20 @@ public:
/// has failed.
virtual std::pair<uint32_t, uint32_t> getVersion() const;
/// @brief Commit Transactions
///
/// Commits all pending database operations.
virtual void commit();
/// @brief Rollback Transactions
///
/// Rolls back all pending database operations.
virtual void rollback();
private:
/// @brief Pointer to the implementation of the @ref PgSqlHostDataSource.
PgSqlHostDataSourceImpl* impl_;
util::RestrictedConstPtr<PgSqlHostDataSourceImpl, ReadOnlyDb> impl_;
};
}