diff options
| author | Ted Ross <tross@apache.org> | 2012-02-09 21:11:41 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2012-02-09 21:11:41 +0000 |
| commit | ffb85ef5d0fe58aab2458f870977502b0c2f258e (patch) | |
| tree | 165205b1298656e0a7784f38bea5b4570954c81f /cpp/src/qpid/broker/QueuePolicy.cpp | |
| parent | 09516db3de415117dd2fe4c3030f463d94953332 (diff) | |
| download | qpid-python-ffb85ef5d0fe58aab2458f870977502b0c2f258e.tar.gz | |
QPID-3824 - Additional queue statistics, posix memory statistics, and broker-scope statistics
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1242526 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/QueuePolicy.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/QueuePolicy.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/QueuePolicy.cpp b/cpp/src/qpid/broker/QueuePolicy.cpp index dafcf92a63..d5b4c1ae86 100644 --- a/cpp/src/qpid/broker/QueuePolicy.cpp +++ b/cpp/src/qpid/broker/QueuePolicy.cpp @@ -31,7 +31,7 @@ using namespace qpid::broker; using namespace qpid::framing; QueuePolicy::QueuePolicy(const std::string& _name, uint32_t _maxCount, uint64_t _maxSize, const std::string& _type) : - maxCount(_maxCount), maxSize(_maxSize), type(_type), count(0), size(0), policyExceeded(false), name(_name) { + maxCount(_maxCount), maxSize(_maxSize), type(_type), count(0), size(0), policyExceeded(false), queue(0), name(_name) { QPID_LOG(info, "Queue \"" << name << "\": Policy created: type=" << type << "; maxCount=" << maxCount << "; maxSize=" << maxSize); } @@ -204,7 +204,11 @@ FlowToDiskPolicy::FlowToDiskPolicy(const std::string& _name, uint32_t _maxCount, bool FlowToDiskPolicy::checkLimit(boost::intrusive_ptr<Message> m) { - if (!QueuePolicy::checkLimit(m)) m->requestContentRelease(); + if (!QueuePolicy::checkLimit(m)) { + m->requestContentRelease(); + if (queue) + queue->countFlowedToDisk(m->contentSize()); + } return true; } |
