Commit 4a7381b8 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[1781] renamed the new NSEC3 methods.

so it will be clearer that they are used only for NSEC3-related records.
as suggested in review.
parent 211934fe
......@@ -1310,7 +1310,7 @@ DatabaseUpdater::addRRset(const AbstractRRset& rrset) {
const string nsec3_columns[Accessor::ADD_NSEC3_COLUMN_COUNT] =
{ cvtr.getNSEC3Name(), cvtr.getTTL(), cvtr.getType(),
rdata_txt };
accessor_->addRecordToNSEC3Zone(nsec3_columns);
accessor_->addNSEC3RecordToZone(nsec3_columns);
} else {
const string columns[Accessor::ADD_COLUMN_COUNT] =
{ cvtr.getName(), cvtr.getRevName(), cvtr.getTTL(),
......@@ -1356,7 +1356,7 @@ DatabaseUpdater::deleteRRset(const AbstractRRset& rrset) {
{ nsec3_type ? cvtr.getNSEC3Name() : cvtr.getName(),
cvtr.getType(), rdata_txt };
if (nsec3_type) {
accessor_->deleteRecordInNSEC3Zone(params);
accessor_->deleteNSEC3RecordInZone(params);
} else {
accessor_->deleteRecordInZone(params);
}
......
......@@ -95,9 +95,9 @@ public:
ADD_COLUMN_COUNT = 6 ///< Number of columns
};
/// \brief Definitions of the fields to be passed to addRecordToNSEC3Zone()
/// \brief Definitions of the fields to be passed to addNSEC3RecordToZone()
///
/// Each derived implementation of addRecordToNSEC3Zone() should expect
/// Each derived implementation of addNSEC3RecordToZone() should expect
/// the "columns" array to be filled with the values as described in this
/// enumeration, in this order.
///
......@@ -117,14 +117,14 @@ public:
};
/// \brief Definitions of the fields to be passed to deleteRecordInZone()
/// and deleteRecordInNSEC3Zone()
/// and deleteNSEC3RecordInZone()
///
/// Each derived implementation of deleteRecordInZone() should expect
/// the "params" array to be filled with the values as described in this
/// enumeration, in this order.
enum DeleteRecordParams {
DEL_NAME = 0, ///< The owner name of the record (a domain name)
///< or the hash label for deleteRecordInNSEC3Zone()
///< or the hash label for deleteNSEC3RecordInZone()
DEL_TYPE = 1, ///< The RRType of the record (A/NS/TXT etc.)
DEL_RDATA = 2, ///< Full text representation of the record's RDATA
DEL_PARAM_COUNT = 3 ///< Number of parameters
......@@ -492,7 +492,7 @@ public:
///
/// \param columns An array of strings that defines a record to be added
/// to the NSEC3 namespace of the zone.
virtual void addRecordToNSEC3Zone(
virtual void addNSEC3RecordToZone(
const std::string (&columns)[ADD_NSEC3_COLUMN_COUNT]) = 0;
/// \brief Delete a single record from the zone to be updated.
......@@ -538,14 +538,14 @@ public:
/// This method is similar to \c deleteRecordInZone(), but is expected to
/// be only used for NSEC3 RRs or RRSIG RRs that cover NSEC3. The
/// relationship between these two methods is similar to that between
/// \c addRecordToZone() and \c addRecordToNSEC3Zone(), and the same
/// \c addRecordToZone() and \c addNSEC3RecordToZone(), and the same
/// notes apply to this method.
///
/// This method uses the same set of parameters to specify the record
/// to be deleted as \c deleteRecordInZone(), but the \c DEL_NAME column
/// is expected to only store the hash label of the owner name.
/// This is the same as \c ADD_NSEC3_HASH column for
/// \c addRecordToNSEC3Zone().
/// \c addNSEC3RecordToZone().
///
/// \exception DataSourceError Invalid call without starting a transaction,
/// or other internal database error.
......@@ -554,7 +554,7 @@ public:
///
/// \param params An array of strings that defines a record to be deleted
/// from the NSEC3 namespace of the zone.
virtual void deleteRecordInNSEC3Zone(
virtual void deleteNSEC3RecordInZone(
const std::string (&params)[DEL_PARAM_COUNT]) = 0;
/// \brief Start a general transaction.
......
......@@ -1122,7 +1122,7 @@ SQLite3Accessor::addRecordToZone(const string (&columns)[ADD_COLUMN_COUNT]) {
}
void
SQLite3Accessor::addRecordToNSEC3Zone(
SQLite3Accessor::addNSEC3RecordToZone(
const string (&/*columns*/)[ADD_NSEC3_COLUMN_COUNT])
{
isc_throw(NotImplemented, "not yet implemented");
......@@ -1139,7 +1139,7 @@ SQLite3Accessor::deleteRecordInZone(const string (&params)[DEL_PARAM_COUNT]) {
}
void
SQLite3Accessor::deleteRecordInNSEC3Zone(
SQLite3Accessor::deleteNSEC3RecordInZone(
const string (&/*params*/)[DEL_PARAM_COUNT])
{
isc_throw(NotImplemented, "not yet implemented");
......
......@@ -214,13 +214,13 @@ public:
virtual void addRecordToZone(
const std::string (&columns)[ADD_COLUMN_COUNT]);
virtual void addRecordToNSEC3Zone(
virtual void addNSEC3RecordToZone(
const std::string (&columns)[ADD_NSEC3_COLUMN_COUNT]);
virtual void deleteRecordInZone(
const std::string (&params)[DEL_PARAM_COUNT]);
virtual void deleteRecordInNSEC3Zone(
virtual void deleteNSEC3RecordInZone(
const std::string (&params)[DEL_PARAM_COUNT]);
/// This derived version of the method prepares an SQLite3 statement
......
......@@ -250,10 +250,10 @@ public:
virtual void commit() {}
virtual void rollback() {}
virtual void addRecordToZone(const string (&)[ADD_COLUMN_COUNT]) {}
virtual void addRecordToNSEC3Zone(const string (&)[ADD_NSEC3_COLUMN_COUNT])
virtual void addNSEC3RecordToZone(const string (&)[ADD_NSEC3_COLUMN_COUNT])
{}
virtual void deleteRecordInZone(const string (&)[DEL_PARAM_COUNT]) {}
virtual void deleteRecordInNSEC3Zone(const string (&)[DEL_PARAM_COUNT]) {}
virtual void deleteNSEC3RecordInZone(const string (&)[DEL_PARAM_COUNT]) {}
virtual void addRecordDiff(int, uint32_t, DiffOperation,
const std::string (&)[DIFF_PARAM_COUNT]) {}
......@@ -714,7 +714,7 @@ public:
}
private:
// Common subroutine for addRecordToZone and addRecordToNSEC3Zone.
// Common subroutine for addRecordToZone and addNSEC3RecordToZone.
void addRecord(Domains& domains,
const string (&columns)[ADD_COLUMN_COUNT])
{
......@@ -743,7 +743,7 @@ public:
addRecord(*update_records_, columns);
}
virtual void addRecordToNSEC3Zone(
virtual void addNSEC3RecordToZone(
const string (&columns)[ADD_NSEC3_COLUMN_COUNT])
{
// Convert the NSEC3 parameters in the normal (non NSEC3) style so
......@@ -772,7 +772,7 @@ private:
const string& rdata_;
};
// Common subroutine for deleteRecordinZone and deleteRecordInNSEC3Zone.
// Common subroutine for deleteRecordinZone and deleteNSEC3RecordInZone.
void deleteRecord(Domains& domains,
const string (&params)[DEL_PARAM_COUNT])
{
......@@ -793,7 +793,7 @@ public:
deleteRecord(*update_records_, params);
}
virtual void deleteRecordInNSEC3Zone(
virtual void deleteNSEC3RecordInZone(
const string (&params)[DEL_PARAM_COUNT])
{
deleteRecord(*update_nsec3_namespace_, params);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment