summaryrefslogtreecommitdiff
path: root/cpp/lib/broker/QueuePolicy.h
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2006-12-07 12:44:08 +0000
committerGordon Sim <gsim@apache.org>2006-12-07 12:44:08 +0000
commitea25bbb6602aa35f7e862e810b99282580cd3684 (patch)
tree2625393031406ba8709bbfa515468b5f523e979e /cpp/lib/broker/QueuePolicy.h
parent6837709d617692649a22b689f7be6741dd569646 (diff)
downloadqpid-python-ea25bbb6602aa35f7e862e810b99282580cd3684.tar.gz
Added unit test and slightly refactored code.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@483437 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/lib/broker/QueuePolicy.h')
-rw-r--r--cpp/lib/broker/QueuePolicy.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/cpp/lib/broker/QueuePolicy.h b/cpp/lib/broker/QueuePolicy.h
index c31e9ec968..597cfe7ce8 100644
--- a/cpp/lib/broker/QueuePolicy.h
+++ b/cpp/lib/broker/QueuePolicy.h
@@ -21,7 +21,6 @@
#ifndef _QueuePolicy_
#define _QueuePolicy_
-#include <BrokerMessage.h>
#include <FieldTable.h>
namespace qpid {
@@ -37,14 +36,14 @@ namespace qpid {
u_int64_t size;
static int getInt(const qpid::framing::FieldTable& settings, const std::string& key, int defaultValue);
- bool checkCount(Message::shared_ptr& msg);
- bool checkSize(Message::shared_ptr& msg);
+
public:
QueuePolicy(u_int32_t maxCount, u_int64_t maxSize);
QueuePolicy(const qpid::framing::FieldTable& settings);
- void enqueued(Message::shared_ptr& msg, MessageStore* store);
- void dequeued(Message::shared_ptr& msg, MessageStore* store);
+ void enqueued(u_int64_t size);
+ void dequeued(u_int64_t size);
void update(qpid::framing::FieldTable& settings);
+ bool limitExceeded();
u_int32_t getMaxCount() const { return maxCount; }
u_int64_t getMaxSize() const { return maxSize; }
};