BIND 10 #2209: define and implement ConfigurableClientList::getCacheZoneUpdater()
BIND 10 Development
do-not-reply at isc.org
Sat Aug 18 07:01:38 UTC 2012
#2209: define and implement ConfigurableClientList::getCacheZoneUpdater()
-------------------------------------+-------------------------------------
Reporter: jinmei | Owner:
Type: task | Status: new
Priority: medium | Milestone: Next-
Component: data source | Sprint-Proposed
Sensitive: 0 | Keywords:
Sub-Project: DNS | Defect Severity: N/A
Estimated Difficulty: 0 | Feature Depending on Ticket:
Total Hours: 0 | background zone loading
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
A subtask of #2201, depend on #2206, #2207.
This is a new method to `ConfigurableClientList` and will eventually
replace reload(). conceptually it would look this:
{{{#!cpp
shared_ptr<memory::ZoneUpdater>
ConfigurableClientList::getCacheZoneUpdater(config) {
// identify the in-memory client
if (type == "MasterFiles") {
updater = mem_client->ztable_segment->getZoneUpdater(
config,
boost::bind(loadMemoryZoneFromFile, master_file, _1),
boost::bind(&InMemoryClient::installZone, mem_client, _1));
return (updater);
} else {
updater = mem_client->ztable_segment->getZoneUpdater(
config,
boost::bind(loadMemoryZoneFromDataSource, backend_client, _1),
boost::bind(&InMemoryClient::installZone, mem_client, _1));
return (updater);
}
}
void
loadMemoryZoneFromFile(ZoneData* zone_data, string zone_file) {
// fill in zone_data from zone_file
}
void
loadMemoryZoneFromDataSource(ZoneData* zone_data, DataSourceClient*
backend) {
// fill in zone_data using backends' iterator
}
}}}
We should already have something close to the two load_action
callbacks. We should only have to adjust the interface.
installZone would reset the corresponding zone segment for shared
memory version. For the moment that could be an empty functor object.
--
Ticket URL: <http://bind10.isc.org/ticket/2209>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list