BIND 10 #347: Implement query counters in auth module
BIND 10 Development
do-not-reply at isc.org
Wed Dec 1 11:56:11 UTC 2010
#347: Implement query counters in auth module
------------------------------+---------------------------------------------
Reporter: naokikambe | Owner: jinmei
Type: enhancement | Status: reviewing
Priority: major | Milestone: y2 12 month milestone
Component: b10-auth | Resolution:
Keywords: | Sensitive: 0
Estimatedhours: 0.0 | Hours: 0
Billable: 1 | Totalhours: 0
Internal: 0 |
------------------------------+---------------------------------------------
Comment(by jinmei):
Replying to [comment:5 jinmei]:
Self follow-up:
> - getCallback(): I think this method naming is too restrictive, and I'd
suggest renaming it to, e.g., getSubmitFunc(). The reason is below.
>
On further look, it doesn't even seem to have to be a functor. We could
define a callback exactly where it's used, i.e., (in the current
implementation) in main.cc, and other methods could just be
straightforward normal functions:
in main.cc
{{{
void
statsTimerCallback(AuthSrv* server) {
// we may have to care the case where 'server' is invalid
server->submitStatistics(); // instead of getStatsCallback()
}
...
itimer->setupTimer(boost::bind(statsTimerCallback, auth_server),
STATS_SEND_INTERVAL_SEC);
}}}
AuthSrv::submitStatistics() would simply call counter->submitStatistics()
(renamed from getCallback()), and Counter::submitStatistics() would do
what CounterImpl::sendStats() currently does.
IMO this is a much better design.
--
Ticket URL: <http://bind10.isc.org/ticket/347#comment:6>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list