Module: check_mk
Branch: master
Commit: 17d09fa593bf0ec6271721bc7db5ade272f341cf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=17d09fa593bf0e…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Jan 21 10:02:37 2016 +0100
Simplify InputBuffer's API.
The are two advantages for doing this:
* It doesn't keep the textual representation of a query alive longer than
needed, something which gets important when the query gets big.
* It reduces coupling between classes, now only Store needs to know the
InputBuffer. So it is e.g. crystal-clear now that Query simply gets a
completed query and doesn't rely on any I/O for this to be done in an
interleaved way.
The representation of the query input has been changed from a deque to a
list. The former is offers constant-time indexing at the price of being more
heavy-weight, something which we don't need.
---
livestatus/src/InputBuffer.cc | 96 +++++++++++++++++++----------------------
livestatus/src/InputBuffer.h | 10 ++---
livestatus/src/Query.cc | 44 +++++++++----------
livestatus/src/Query.h | 4 +-
livestatus/src/Store.cc | 21 +++++----
livestatus/src/Store.h | 4 +-
6 files changed, 86 insertions(+), 93 deletions(-)
Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=17d09fa593…