BIND 10 trac2268, updated. e2b120a2e016f249eabaf7753b97a79ece0bffa1 [2268] Move FileNameDeleter out of InMemoryClient
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Oct 12 04:42:08 UTC 2012
The branch, trac2268 has been updated
via e2b120a2e016f249eabaf7753b97a79ece0bffa1 (commit)
via 1e6d2102d1402cfcd6d2c1ecd88c6aa83133daa2 (commit)
via 8b59a7d661ce81cb47c2f18d2908a01a8ab9ded0 (commit)
from f17651217197a8006509ef121f1a3d7a5eada1b4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e2b120a2e016f249eabaf7753b97a79ece0bffa1
Author: Mukund Sivaraman <muks at isc.org>
Date: Fri Oct 12 10:10:11 2012 +0530
[2268] Move FileNameDeleter out of InMemoryClient
commit 1e6d2102d1402cfcd6d2c1ecd88c6aa83133daa2
Author: Mukund Sivaraman <muks at isc.org>
Date: Fri Oct 12 10:07:13 2012 +0530
[2268] Update API doc
commit 8b59a7d661ce81cb47c2f18d2908a01a8ab9ded0
Author: Mukund Sivaraman <muks at isc.org>
Date: Fri Oct 12 10:07:04 2012 +0530
[2268] Move ZoneDataLoader into an unnamed namespace
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/memory/memory_client.cc | 8 +++++++-
src/lib/datasrc/memory/memory_client.h | 4 ----
src/lib/datasrc/memory/zone_data_loader.cc | 10 +++++-----
src/lib/datasrc/memory/zone_data_loader.h | 26 +++++++++++++++++++++++++-
4 files changed, 37 insertions(+), 11 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/memory_client.cc b/src/lib/datasrc/memory/memory_client.cc
index 4ad87c8..673c338 100644
--- a/src/lib/datasrc/memory/memory_client.cc
+++ b/src/lib/datasrc/memory/memory_client.cc
@@ -49,7 +49,11 @@ namespace memory {
using detail::SegmentObjectHolder;
-class InMemoryClient::FileNameDeleter {
+namespace { // unnamed namespace
+
+// A helper internal class used by the memory client, used for deleting
+// filenames stored in an internal tree.
+class FileNameDeleter {
public:
FileNameDeleter() {}
@@ -58,6 +62,8 @@ public:
}
};
+} // end of unnamed namespace
+
InMemoryClient::InMemoryClient(util::MemorySegment& mem_sgmt,
RRClass rrclass) :
mem_sgmt_(mem_sgmt),
diff --git a/src/lib/datasrc/memory/memory_client.h b/src/lib/datasrc/memory/memory_client.h
index b08e916..bc79e29 100644
--- a/src/lib/datasrc/memory/memory_client.h
+++ b/src/lib/datasrc/memory/memory_client.h
@@ -191,10 +191,6 @@ private:
unsigned int zone_count_;
ZoneTable* zone_table_;
FileNameTree* file_name_tree_;
-
- // A helper internal class used by the memory client, used for
- // deleting filenames stored in an internal tree.
- class FileNameDeleter;
};
} // namespace memory
diff --git a/src/lib/datasrc/memory/zone_data_loader.cc b/src/lib/datasrc/memory/zone_data_loader.cc
index cfb05d5..b6587fe 100644
--- a/src/lib/datasrc/memory/zone_data_loader.cc
+++ b/src/lib/datasrc/memory/zone_data_loader.cc
@@ -36,6 +36,11 @@ namespace memory {
using detail::SegmentObjectHolder;
+namespace { // unnamed namespace
+
+// A functor type used for loading.
+typedef boost::function<void(isc::dns::ConstRRsetPtr)> LoadCallback;
+
// A helper internal class for \c loadZoneData(). make it non-copyable
// to avoid accidental copy.
//
@@ -158,11 +163,6 @@ ZoneDataLoader::getCurrentName() const {
return (node_rrsigsets_.begin()->second->getName());
}
-namespace { // unnamed namespace
-
-// A functor type used for loading.
-typedef boost::function<void(isc::dns::ConstRRsetPtr)> LoadCallback;
-
ZoneData*
loadZoneDataInternal(util::MemorySegment& mem_sgmt,
const isc::dns::RRClass rrclass,
diff --git a/src/lib/datasrc/memory/zone_data_loader.h b/src/lib/datasrc/memory/zone_data_loader.h
index 08f590d..21f7ad6 100644
--- a/src/lib/datasrc/memory/zone_data_loader.h
+++ b/src/lib/datasrc/memory/zone_data_loader.h
@@ -27,7 +27,7 @@ namespace memory {
/// \brief Zone is empty exception.
///
-/// This is thrown if we have an empty zone created during
+/// This is thrown if an empty zone would be created during
/// \c loadZoneData().
struct EmptyZone : public InvalidParameter {
EmptyZone(const char* file, size_t line, const char* what) :
@@ -35,11 +35,35 @@ struct EmptyZone : public InvalidParameter {
{}
};
+/// \brief Create and return a ZoneData instance populated from the
+/// \c zone_file.
+///
+/// Throws \c ZoneDataUpdater::AddError if invalid or inconsistent data
+/// is present in the \c zone_file. Throws \c isc::Unexpected if empty
+/// RRsets are passed by the master loader. Throws \c EmptyZone if an
+/// empty zone would be created due to the \c loadZoneData().
+///
+/// \param mem_sgmt The memory segment.
+/// \param rrclass The RRClass.
+/// \param zone_name The name of the zone that is being loaded.
+/// \param zone_file Filename which contains the zone data for \c zone_name.
ZoneData* loadZoneData(util::MemorySegment& mem_sgmt,
const isc::dns::RRClass rrclass,
const isc::dns::Name& zone_name,
const std::string& zone_file);
+/// \brief Create and return a ZoneData instance populated from the
+/// \c iterator.
+///
+/// Throws \c ZoneDataUpdater::AddError if invalid or inconsistent data
+/// is present in the \c zone_file. Throws \c isc::Unexpected if empty
+/// RRsets are passed by the zone iterator. Throws \c EmptyZone if an
+/// empty zone would be created due to the \c loadZoneData().
+///
+/// \param mem_sgmt The memory segment.
+/// \param rrclass The RRClass.
+/// \param zone_name The name of the zone that is being loaded.
+/// \param iterator Iterator that returns RRsets to load into the zone.
ZoneData* loadZoneData(util::MemorySegment& mem_sgmt,
const isc::dns::RRClass rrclass,
const isc::dns::Name& zone_name,
More information about the bind10-changes
mailing list