BIND 10 #2207: define and implement (datasrc::memory::)ZoneUpdater class
BIND 10 Development
do-not-reply at isc.org
Sat Aug 18 00:51:01 UTC 2012
#2207: define and implement (datasrc::memory::)ZoneUpdater class
-------------------------------------+-------------------------------------
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.
See the conceptual definition below.
{{{#!cpp
// Provide interfaces for staged zone loading, hiding the underlying
// memory segment model.
class isc::datasrc::memory::ZoneUpdater {
public:
// (Conceptually) load zone(s) content in memory. This can take
// long time.
// For the local memory segment version, it creates a new ZoneData
using
// the zone table's local memory segment, and load the zone using
// the given load_action.
// For the shared memory segment version, this is probably no-op
// (the time consuming part should have been done by the "b10-memmgr")
virtual void load() = 0;
// Install the new zone image so it can actually be used by the
caller.
// For the local memory segment version, it saves the old version of
// ZoneData from the table and inserts the newly created one in
load()
// to the zone table.
// The shared memory version would just internally create
// a new MemorySegment object with a given shared segment parameter,
// and pass it to the caller via the install_action.
virtual void install() = 0;
// (Conceptually) release any resource used for the older version of
zone.
// This can take long time.
// The local memory version destroys the saved (in install()) old
version
// of ZoneData.
// The share memory version would probably be no-op.
virtual void cleanup() = 0;
};
}}}
Aand implement the `ZoneUpdaterLocal` derived class:
{{{#!cpp
// local memory segment version of ZoneUpdater
class ZoneUpdaterLocal : public ZoneUpdater {
public:
ZoneUpdaterLocal(ztable_segment, load_action, install_action);
...
};
}}}
Finally, add the getZoneUpdater() method to `ZoneTableSegment`
(see #2206) and implement it for `ZoneTableSegmentLocal`.
--
Ticket URL: <http://bind10.isc.org/ticket/2207>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list