BIND 10 #2943: extensions to ZoneTableSegment and complete ConfigurableClientList::getStatus

BIND 10 Development do-not-reply at isc.org
Tue May 7 03:49:14 UTC 2013


#2943: extensions to ZoneTableSegment and complete
ConfigurableClientList::getStatus
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  task          |                       Status:  new
            Priority:  medium        |                    Milestone:  Next-
           Component:  data source   |  Sprint-Proposed
            Keywords:                |                   Resolution:
           Sensitive:  0             |                 CVSS Scoring:
         Sub-Project:  DNS           |              Defect Severity:  N/A
Estimated Difficulty:  0             |  Feature Depending on Ticket:
         Total Hours:  0             |  shared memory data source
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
Description changed by jinmei:

Old description:

> We need to complete the "TODO" part of
> `ConfigurableClientList::getStatus`:
> {{{#!cpp
>     vector<DataSourceStatus> result;
>     BOOST_FOREACH(const DataSourceInfo& info, data_sources_) {
>         // TODO: Once we support mapped cache, decide when we need the
>         // SEGMENT_WAITING.
>         result.push_back(DataSourceStatus(info.name_, info.cache_ ?
>                                           SEGMENT_INUSE : SEGMENT_UNUSED,
>                                           "local"));
>     }
>     return (result);
> }}}
>
> To do so, we need two small extensions to the `ZoneTableSegment`
> class:
>
> {{{#!cpp
> class ZoneTableSegment {
> public:
>     /// ZoneTableSegmentLocal returns "local"; ZoneTableSegmentMapped
> returns
>     /// "mapped"
>     virtual std::string getStringType() const = 0;
>
>     /// ZoneTableSegmentLocal always returns true; ZoneTableSegmentMapped
>     /// returns true iff the memory segment has been set by reset().
>     virtual bool isUsable() const = 0;
> };
> }}}
>
> In this task, we implement these extensions (base class, local and
> mapped) and complete getStatus() using these methods.

New description:

 subtask of #2830, depend on #2850

 We need to complete the "TODO" part of
 `ConfigurableClientList::getStatus`:
 {{{#!cpp
     vector<DataSourceStatus> result;
     BOOST_FOREACH(const DataSourceInfo& info, data_sources_) {
         // TODO: Once we support mapped cache, decide when we need the
         // SEGMENT_WAITING.
         result.push_back(DataSourceStatus(info.name_, info.cache_ ?
                                           SEGMENT_INUSE : SEGMENT_UNUSED,
                                           "local"));
     }
     return (result);
 }}}

 To do so, we need two small extensions to the `ZoneTableSegment`
 class:

 {{{#!cpp
 class ZoneTableSegment {
 public:
     /// ZoneTableSegmentLocal returns "local"; ZoneTableSegmentMapped
 returns
     /// "mapped"
     virtual std::string getStringType() const = 0;

     /// ZoneTableSegmentLocal always returns true; ZoneTableSegmentMapped
     /// returns true iff the memory segment has been set by reset().
     virtual bool isUsable() const = 0;
 };
 }}}

 In this task, we implement these extensions (base class, local and
 mapped) and complete getStatus() using these methods.

--

-- 
Ticket URL: <http://bind10.isc.org/ticket/2943#comment:1>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list