diff options
author | Alan Conway <aconway@apache.org> | 2008-11-11 21:09:21 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-11-11 21:09:21 +0000 |
commit | 5c2c542b044a0cc661c2fe435103fe25db1b6da5 (patch) | |
tree | ac488c4b4048516d72f5555bcbc5803121ae2c78 /cpp | |
parent | ce71dffee41acc012536afa37465cfac214d5439 (diff) | |
download | qpid-python-5c2c542b044a0cc661c2fe435103fe25db1b6da5.tar.gz |
Include DeliveryRecord::credit in replication to new members.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@713171 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/qpid/broker/DeliveryRecord.cpp | 5 | ||||
-rw-r--r-- | cpp/src/qpid/broker/DeliveryRecord.h | 3 | ||||
-rw-r--r-- | cpp/src/qpid/cluster/Connection.cpp | 5 | ||||
-rw-r--r-- | cpp/src/qpid/cluster/Connection.h | 3 | ||||
-rw-r--r-- | cpp/src/qpid/cluster/DumpClient.cpp | 4 | ||||
-rw-r--r-- | cpp/xml/cluster.xml | 1 |
6 files changed, 14 insertions, 7 deletions
diff --git a/cpp/src/qpid/broker/DeliveryRecord.cpp b/cpp/src/qpid/broker/DeliveryRecord.cpp index 900016d381..e68cc79d8b 100644 --- a/cpp/src/qpid/broker/DeliveryRecord.cpp +++ b/cpp/src/qpid/broker/DeliveryRecord.cpp @@ -35,7 +35,8 @@ DeliveryRecord::DeliveryRecord(const QueuedMessage& _msg, const std::string& _tag, bool _acquired, bool accepted, - bool _windowing) : msg(_msg), + bool _windowing, + uint32_t _credit) : msg(_msg), queue(_queue), tag(_tag), acquired(_acquired), @@ -44,7 +45,7 @@ DeliveryRecord::DeliveryRecord(const QueuedMessage& _msg, completed(false), ended(accepted), windowing(_windowing), - credit(msg.payload ? msg.payload->getRequiredCredit() : 0) + credit(msg.payload ? msg.payload->getRequiredCredit() : _credit) {} void DeliveryRecord::setEnded() diff --git a/cpp/src/qpid/broker/DeliveryRecord.h b/cpp/src/qpid/broker/DeliveryRecord.h index 952e888c03..4b372b2cfa 100644 --- a/cpp/src/qpid/broker/DeliveryRecord.h +++ b/cpp/src/qpid/broker/DeliveryRecord.h @@ -80,7 +80,8 @@ class DeliveryRecord const std::string& tag, bool acquired, bool accepted, - bool windowing + bool windowing, + uint32_t credit=0 // Only used if msg is empty. ); bool matches(DeliveryId tag) const; diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp index ddfba03850..9c0b371066 100644 --- a/cpp/src/qpid/cluster/Connection.cpp +++ b/cpp/src/qpid/cluster/Connection.cpp @@ -280,7 +280,8 @@ void Connection::deliveryRecord(const string& qname, bool cancelled, bool completed, bool ended, - bool windowing) + bool windowing, + uint32_t credit) { broker::QueuedMessage m; broker::Queue::shared_ptr queue = findQueue(qname); @@ -293,7 +294,7 @@ void Connection::deliveryRecord(const string& qname, throw Exception(QPID_MSG("deliveryRecord no dump message")); } - broker::DeliveryRecord dr(m, queue, tag, acquired, accepted, windowing); + broker::DeliveryRecord dr(m, queue, tag, acquired, accepted, windowing, credit); dr.setId(id); if (cancelled) dr.cancel(dr.getTag()); if (completed) dr.complete(); diff --git a/cpp/src/qpid/cluster/Connection.h b/cpp/src/qpid/cluster/Connection.h index 06176bf81d..4d06848ae6 100644 --- a/cpp/src/qpid/cluster/Connection.h +++ b/cpp/src/qpid/cluster/Connection.h @@ -124,7 +124,8 @@ class Connection : bool cancelled, bool completed, bool ended, - bool windowing); + bool windowing, + uint32_t credit); void queuePosition(const std::string&, const framing::SequenceNumber&); diff --git a/cpp/src/qpid/cluster/DumpClient.cpp b/cpp/src/qpid/cluster/DumpClient.cpp index bb3cfdfa56..18db83ba87 100644 --- a/cpp/src/qpid/cluster/DumpClient.cpp +++ b/cpp/src/qpid/cluster/DumpClient.cpp @@ -308,7 +308,9 @@ void DumpClient::dumpUnacked(const broker::DeliveryRecord& dr) { dr.isCancelled(), dr.isComplete(), dr.isEnded(), - dr.isWindowing()); + dr.isWindowing(), + dr.getCredit() + ); } class TxOpDumper : public broker::TxOpConstVisitor, public MessageDumper { diff --git a/cpp/xml/cluster.xml b/cpp/xml/cluster.xml index 549914268b..d553ecb492 100644 --- a/cpp/xml/cluster.xml +++ b/cpp/xml/cluster.xml @@ -94,6 +94,7 @@ <field name="completed" type="bit"/> <field name="ended" type="bit"/> <field name="windowing" type="bit"/> + <field name="credit" type="uint32"/> </control> <!-- Tx transaction state. --> |