/// \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) :
{}
};
+/// \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,