qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cctriel...@apache.org
Subject svn commit: r593251 - in /incubator/qpid/trunk/qpid/cpp/src: qpid/broker/ tests/
Date Thu, 08 Nov 2007 18:46:55 GMT
Author: cctrieloff
Date: Thu Nov  8 10:46:53 2007
New Revision: 593251

URL: http://svn.apache.org/viewvc?rev=593251&view=rev
Log:

- enable the ability to lazy load from async store
- the ci has a raw ptr for Queue in QueuedMessage, if any has 
any concerns, ping me and I will convert it to an auto_ptr
Carl.


Modified:
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Consumer.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryAdapter.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageBuilder.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageDelivery.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageDelivery.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStore.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticHandler.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticHandler.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.h
    incubator/qpid/trunk/qpid/cpp/src/tests/BrokerChannelTest.cpp
    incubator/qpid/trunk/qpid/cpp/src/tests/DeliveryRecordTest.cpp
    incubator/qpid/trunk/qpid/cpp/src/tests/TxAckTest.cpp

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Consumer.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Consumer.h?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Consumer.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Consumer.h Thu Nov  8 10:46:53 2007
@@ -21,6 +21,11 @@
 #ifndef _Consumer_
 #define _Consumer_
 
+namespace qpid {
+    namespace broker {
+		class Queue;
+}}
+
 #include "Message.h"
 
 namespace qpid {
@@ -30,9 +35,11 @@
         {
             Message::shared_ptr payload;
             framing::SequenceNumber position;
-
-            QueuedMessage(Message::shared_ptr msg, framing::SequenceNumber sn) : payload(msg),
position(sn) {}
-            QueuedMessage() {}
+			Queue* queue;
+			
+            QueuedMessage(Queue* q, Message::shared_ptr msg, framing::SequenceNumber sn)
: 
+			               payload(msg), position(sn), queue(q) {}
+            QueuedMessage(Queue* q) : queue(q) {}
         };
         
 

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryAdapter.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryAdapter.h?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryAdapter.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryAdapter.h Thu Nov  8 10:46:53 2007
@@ -42,7 +42,7 @@
     class DeliveryAdapter
     {
     public:
-        virtual DeliveryId deliver(Message::shared_ptr& msg, DeliveryToken::shared_ptr
token) = 0;
+        virtual DeliveryId deliver(QueuedMessage& msg, DeliveryToken::shared_ptr token)
= 0;
         virtual ~DeliveryAdapter(){}
     };
 

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp Thu Nov  8 10:46:53 2007
@@ -89,7 +89,7 @@
             requeue();
         }else{
             msg.payload->redeliver();//mark as redelivered
-            id = session->redeliver(msg.payload, token);
+            id = session->redeliver(msg, token);
         }
     }
 }

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.cpp?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.cpp Thu Nov  8 10:46:53 2007
@@ -150,7 +150,7 @@
     setContentReleased();
 }
 
-void Message::sendContent(framing::FrameHandler& out, uint16_t maxFrameSize) const
+void Message::sendContent(Queue& queue, framing::FrameHandler& out, uint16_t maxFrameSize)
const
 {
     if (isContentReleased()) {
         //load content from store in chunks of maxContentSize
@@ -162,7 +162,7 @@
             AMQFrame frame(0, AMQContentBody());
             string& data = frame.castBody<AMQContentBody>()->getData();
 
-            store->loadContent(*this, data, offset,
+            store->loadContent(queue, *this, data, offset,
                                remaining > maxContentSize ? maxContentSize : remaining);
             frame.setBof(false);
             frame.setEof(true);

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.h?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Message.h Thu Nov  8 10:46:53 2007
@@ -41,6 +41,7 @@
 class Exchange;
 class ExchangeRegistry;
 class MessageStore;
+class Queue;
 
 class Message : public PersistableMessage {
 public:
@@ -114,7 +115,7 @@
      */
     void releaseContent(MessageStore* store);
 
-    void sendContent(framing::FrameHandler& out, uint16_t maxFrameSize) const;
+    void sendContent(Queue& queue, framing::FrameHandler& out, uint16_t maxFrameSize)
const;
     void sendHeader(framing::FrameHandler& out, uint16_t maxFrameSize) const;
 
     bool isContentLoaded() const;

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageBuilder.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageBuilder.cpp?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageBuilder.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageBuilder.cpp Thu Nov  8 10:46:53 2007
@@ -54,7 +54,7 @@
         message->getFrames().append(frame);
         //have we reached the staging limit? if so stage message and release content
         if (state == CONTENT && stagingThreshold && message->getFrames().getContentSize()
>= stagingThreshold) {
-            message->releaseContent(store);
+            message->releaseContent(store); 
             staging = true;
         }
     }

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageDelivery.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageDelivery.cpp?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageDelivery.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageDelivery.cpp Thu Nov  8 10:46:53
2007
@@ -113,7 +113,7 @@
     return DeliveryToken::shared_ptr(new MessageDeliveryToken(destination, confirmMode, acquireMode));
 }
 
-void MessageDelivery::deliver(Message::shared_ptr msg, 
+void MessageDelivery::deliver(QueuedMessage& msg, 
                               framing::FrameHandler& handler, 
                               DeliveryId id, 
                               DeliveryToken::shared_ptr token, 
@@ -124,9 +124,9 @@
     //have one content class for 0-10 proper
 
     boost::shared_ptr<BaseToken> t = dynamic_pointer_cast<BaseToken>(token);
-    AMQFrame method = t->sendMethod(msg, id);
+    AMQFrame method = t->sendMethod(msg.payload, id);
     method.setEof(false);
     handler.handle(method);
-    msg->sendHeader(handler, framesize);
-    msg->sendContent(handler, framesize);
+    msg.payload->sendHeader(handler, framesize);
+    msg.payload->sendContent(*(msg.queue), handler, framesize);
 }

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageDelivery.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageDelivery.h?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageDelivery.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageDelivery.h Thu Nov  8 10:46:53 2007
@@ -23,6 +23,7 @@
  */
 #include <boost/shared_ptr.hpp>
 #include "DeliveryId.h"
+#include "Consumer.h"
 #include "qpid/framing/FrameHandler.h"
 
 namespace qpid {
@@ -43,7 +44,7 @@
                                                                     u_int8_t confirmMode,

                                                                     u_int8_t acquireMode);
 
-    static void deliver(boost::shared_ptr<Message> msg, framing::FrameHandler&
out, 
+    static void deliver(QueuedMessage& msg, framing::FrameHandler& out, 
                         DeliveryId deliveryTag, boost::shared_ptr<DeliveryToken> token,
uint16_t framesize);
 };
 

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStore.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStore.h?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStore.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStore.h Thu Nov  8 10:46:53 2007
@@ -85,9 +85,16 @@
      * point). If the message has not yet been stored it will
      * store the headers as well as any content passed in. A
      * persistence id will be set on the message which can be
-     * used to load the content or to append to it.
+     * used to load the content or to append to it. 
+	 * 
+	 * TODO ::If it is know
+	 * which queue the message is to be staged/ release to in cases
+	 * of flowing tmp messages to disk for memory conservation set
+	 * the queue ptr. This allows the store to optimize the read/writes
+	 * for that queue and avoid searching based on id. Set queue = 0 for
+	 * large message staging when the queue is not known.
      */
-    virtual void stage(PersistableMessage& msg) = 0;
+    virtual void stage( PersistableMessage& msg) = 0;
             
     /**
      * Destroys a previously staged message. This only needs
@@ -110,7 +117,8 @@
      * content should be loaded, not the headers or related
      * meta-data).
      */
-    virtual void loadContent(const PersistableMessage& msg, std::string& data, uint64_t
offset, uint32_t length) = 0;
+    virtual void loadContent(const qpid::broker::PersistableQueue& queue, 
+	                         const PersistableMessage& msg, std::string& data, uint64_t
offset, uint32_t length) = 0;
     
     /**
      * Enqueues a message, storing the message if it has not

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp Thu Nov  8 10:46:53
2007
@@ -71,7 +71,7 @@
     store->recover(registry);
 }
 
-void MessageStoreModule::stage(PersistableMessage& msg)
+void MessageStoreModule::stage( PersistableMessage& msg)
 {
     store->stage(msg);
 }
@@ -86,9 +86,10 @@
     store->appendContent(msg, data);
 }
 
-void MessageStoreModule::loadContent(const PersistableMessage& msg, string& data,
uint64_t offset, uint32_t length)
+void MessageStoreModule::loadContent(const qpid::broker::PersistableQueue& queue, 
+     const PersistableMessage& msg, string& data, uint64_t offset, uint32_t length)
 {
-    store->loadContent(msg, data, offset, length);
+    store->loadContent(queue, msg, data, offset, length);
 }
 
 void MessageStoreModule::enqueue(TransactionContext* ctxt, PersistableMessage& msg, const
PersistableQueue& queue)

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.h?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.h Thu Nov  8 10:46:53
2007
@@ -58,7 +58,8 @@
     void stage(PersistableMessage& msg);
     void destroy(PersistableMessage& msg);
     void appendContent(const PersistableMessage& msg, const std::string& data);
-    void loadContent(const PersistableMessage& msg, std::string& data, uint64_t offset,
uint32_t length);
+    void loadContent(const qpid::broker::PersistableQueue& queue, 
+	          const PersistableMessage& msg, std::string& data, uint64_t offset, uint32_t
length);
 
     void enqueue(TransactionContext* ctxt, PersistableMessage& msg, const PersistableQueue&
queue);
     void dequeue(TransactionContext* ctxt, PersistableMessage& msg, const PersistableQueue&
queue);

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.cpp?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.cpp Thu Nov  8 10:46:53
2007
@@ -93,7 +93,7 @@
     QPID_LOG(info, "Can't append content. Persistence not enabled.");
 }
 
-void NullMessageStore::loadContent(const PersistableMessage&, string&, uint64_t,
uint32_t)
+void NullMessageStore::loadContent(const qpid::broker::PersistableQueue&, const PersistableMessage&,
string&, uint64_t, uint32_t)
 {
     QPID_LOG(info, "Can't load content. Persistence not enabled.");
 }

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.h?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.h Thu Nov  8 10:46:53 2007
@@ -59,7 +59,8 @@
     virtual void stage(PersistableMessage& msg);
     virtual void destroy(PersistableMessage& msg);
     virtual void appendContent(const PersistableMessage& msg, const std::string&
data);
-    virtual void loadContent(const PersistableMessage& msg, std::string& data, uint64_t
offset, uint32_t length);
+    virtual void loadContent(const qpid::broker::PersistableQueue& queue, 
+	                   const PersistableMessage& msg, std::string& data, uint64_t offset,
uint32_t length);
     virtual void enqueue(TransactionContext* ctxt, PersistableMessage& msg, const PersistableQueue&
queue);
     virtual void dequeue(TransactionContext* ctxt, PersistableMessage& msg, const PersistableQueue&
queue);
     virtual u_int32_t outstandingQueueAIO(const PersistableQueue& queue);

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp Thu Nov  8 10:46:53 2007
@@ -212,7 +212,7 @@
 
 void Queue::dispatch()
 {
-     QueuedMessage msg;
+     QueuedMessage msg(this);
      while (getNextMessage(msg) && msg.payload->isEnqueueComplete()){
          if (dispatch(msg)) {
              pop();
@@ -242,7 +242,7 @@
 
 void Queue::serviceBrowser(Consumer::ptr browser)
 {
-    QueuedMessage msg;
+    QueuedMessage msg(this);
     while (seek(msg, browser->position) && browser->deliver(msg)) {
         browser->position = msg.position;
     }
@@ -318,7 +318,7 @@
 
 QueuedMessage Queue::dequeue(){
     Mutex::ScopedLock locker(messageLock);
-    QueuedMessage msg;
+    QueuedMessage msg(this);
 
     if(!messages.empty()){
         msg = messages.front();
@@ -350,7 +350,7 @@
 
 void Queue::push(Message::shared_ptr& msg){
     Mutex::ScopedLock locker(messageLock);
-    messages.push_back(QueuedMessage(msg, ++sequence));
+    messages.push_back(QueuedMessage(this, msg, ++sequence));
     if (policy.get()) {
         policy->enqueued(msg->contentSize());
         if (policy->limitExceeded()) {

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticHandler.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticHandler.cpp?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticHandler.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticHandler.cpp Thu Nov  8 10:46:53
2007
@@ -163,7 +163,7 @@
     }
 }
 
-DeliveryId SemanticHandler::deliver(Message::shared_ptr& msg, DeliveryToken::shared_ptr
token)
+DeliveryId SemanticHandler::deliver(QueuedMessage& msg, DeliveryToken::shared_ptr token)
 {
     Mutex::ScopedLock l(outLock);
     MessageDelivery::deliver(

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticHandler.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticHandler.h?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticHandler.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticHandler.h Thu Nov  8 10:46:53 2007
@@ -75,7 +75,7 @@
     void sendCompletion();
 
     //delivery adapter methods:
-    DeliveryId deliver(Message::shared_ptr& msg, DeliveryToken::shared_ptr token);
+    DeliveryId deliver(QueuedMessage& msg, DeliveryToken::shared_ptr token);
 
     framing::AMQP_ClientProxy& getProxy() { return session.getProxy(); }
     Connection& getConnection() { return session.getConnection(); }

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp Thu Nov  8 10:46:53 2007
@@ -277,7 +277,7 @@
             Mutex::ScopedLock locker(parent->deliveryLock);
 
             DeliveryId deliveryTag =
-                parent->deliveryAdapter.deliver(msg.payload, token);
+                parent->deliveryAdapter.deliver(msg, token);
             if (windowing || ackExpected) {
                 parent->record(DeliveryRecord(msg, queue, name, token, deliveryTag, acquire,
!ackExpected));
             } else if (acquire && !ackExpected) {
@@ -471,7 +471,7 @@
     QueuedMessage msg = queue->dequeue();
     if(msg.payload){
         Mutex::ScopedLock locker(deliveryLock);
-        DeliveryId myDeliveryTag = deliveryAdapter.deliver(msg.payload, token);
+        DeliveryId myDeliveryTag = deliveryAdapter.deliver(msg, token);
         if(ackExpected){
             unacked.push_back(DeliveryRecord(msg, queue, myDeliveryTag));
         }
@@ -481,7 +481,7 @@
     }
 }
 
-DeliveryId SemanticState::redeliver(Message::shared_ptr& msg, DeliveryToken::shared_ptr
token)
+DeliveryId SemanticState::redeliver(QueuedMessage& msg, DeliveryToken::shared_ptr token)
 {
     Mutex::ScopedLock locker(deliveryLock);
     return deliveryAdapter.deliver(msg, token);

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.h?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.h Thu Nov  8 10:46:53 2007
@@ -183,7 +183,7 @@
     void ackRange(DeliveryId deliveryTag, DeliveryId endTag);
     void recover(bool requeue);
     void flow(bool active);
-    DeliveryId redeliver(Message::shared_ptr& msg, DeliveryToken::shared_ptr token);
           
+    DeliveryId redeliver(QueuedMessage& msg, DeliveryToken::shared_ptr token);      
     
     void acquire(DeliveryId first, DeliveryId last, std::vector<DeliveryId>& acquired);
     void release(DeliveryId first, DeliveryId last);
     void reject(DeliveryId first, DeliveryId last);

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/BrokerChannelTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/BrokerChannelTest.cpp?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/BrokerChannelTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/BrokerChannelTest.cpp Thu Nov  8 10:46:53 2007
@@ -251,7 +251,7 @@
         policy.update(settings);
         
         store.expect();
-        store.stage(*msg3);
+        store.stage(0, *msg3);
         store.test();
 
         Queue::shared_ptr queue(new Queue("my_queue", false, &store, 0));

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/DeliveryRecordTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/DeliveryRecordTest.cpp?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/DeliveryRecordTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/DeliveryRecordTest.cpp Thu Nov  8 10:46:53 2007
@@ -51,7 +51,7 @@
 
         list<DeliveryRecord> records;
         for (list<SequenceNumber>::iterator i = ids.begin(); i != ids.end(); i++) {
-            records.push_back(DeliveryRecord(QueuedMessage(), Queue::shared_ptr(), "tag",
DeliveryToken::shared_ptr(), *i, false, false));
+            records.push_back(DeliveryRecord(QueuedMessage(0), Queue::shared_ptr(), "tag",
DeliveryToken::shared_ptr(), *i, false, false));
         }
         records.sort();
 

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/TxAckTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/TxAckTest.cpp?rev=593251&r1=593250&r2=593251&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/TxAckTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/TxAckTest.cpp Thu Nov  8 10:46:53 2007
@@ -76,7 +76,7 @@
             msg->getProperties<DeliveryProperties>()->setDeliveryMode(PERSISTENT);
             msg->getProperties<DeliveryProperties>()->setRoutingKey("routing_key");
             messages.push_back(msg);
-            QueuedMessage qm;
+            QueuedMessage qm(queue.get());
             qm.payload = msg;
             deliveries.push_back(DeliveryRecord(qm, queue, "xyz", DeliveryToken::shared_ptr(),
(i+1), true));
         }



Mime
View raw message