summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/Dispatcher.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-09-26 10:02:25 +0000
committerGordon Sim <gsim@apache.org>2007-09-26 10:02:25 +0000
commitcb11cc2309711c4e977ba3de2384ff3437e00154 (patch)
tree11e4a769c4c2fe3b0565cfec369e7614660cfb71 /cpp/src/qpid/client/Dispatcher.cpp
parent00b761b3b6d80ee2bb3e538face881748efb2b09 (diff)
downloadqpid-python-cb11cc2309711c4e977ba3de2384ff3437e00154.tar.gz
Start execution mark from -1 (0xFFFFFFFF)
Rename ackFrequency as ackBatchSize in Dispatcher git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@579553 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/Dispatcher.cpp')
-rw-r--r--cpp/src/qpid/client/Dispatcher.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/cpp/src/qpid/client/Dispatcher.cpp b/cpp/src/qpid/client/Dispatcher.cpp
index fd437725ce..5c3c85343e 100644
--- a/cpp/src/qpid/client/Dispatcher.cpp
+++ b/cpp/src/qpid/client/Dispatcher.cpp
@@ -36,14 +36,14 @@ using qpid::sys::Thread;
namespace qpid {
namespace client {
- Subscriber::Subscriber(Session& s, MessageListener* l, bool a, uint f) : session(s), listener(l), autoAck(a), ackFrequency(f), count(0) {}
+ Subscriber::Subscriber(Session& s, MessageListener* l, bool a, uint f) : session(s), listener(l), autoAck(a), ackBatchSize(f), count(0) {}
void Subscriber::received(Message& msg)
{
if (listener) {
listener->received(msg);
if (autoAck) {
- bool send = (++count >= ackFrequency);
+ bool send = (++count >= ackBatchSize);
msg.acknowledge(session, true, send);
if (send) count = 0;
}
@@ -129,16 +129,16 @@ Subscriber::shared_ptr Dispatcher::find(const std::string& name)
return i->second;
}
-void Dispatcher::listen(MessageListener* listener, bool autoAck, uint ackFrequency)
+void Dispatcher::listen(MessageListener* listener, bool autoAck, uint ackBatchSize)
{
ScopedLock<Mutex> l(lock);
- defaultListener = Subscriber::shared_ptr(new Subscriber(session, listener, autoAck, ackFrequency));
+ defaultListener = Subscriber::shared_ptr(new Subscriber(session, listener, autoAck, ackBatchSize));
}
-void Dispatcher::listen(const std::string& destination, MessageListener* listener, bool autoAck, uint ackFrequency)
+void Dispatcher::listen(const std::string& destination, MessageListener* listener, bool autoAck, uint ackBatchSize)
{
ScopedLock<Mutex> l(lock);
- listeners[destination] = Subscriber::shared_ptr(new Subscriber(session, listener, autoAck, ackFrequency));
+ listeners[destination] = Subscriber::shared_ptr(new Subscriber(session, listener, autoAck, ackBatchSize));
}
void Dispatcher::cancel(const std::string& destination)