You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kg...@apache.org on 2011/06/17 22:54:26 UTC

svn commit: r1137018 - in /qpid/branches/qpid-3079/qpid/cpp/src/qpid/broker: PersistableQueue.h Queue.cpp Queue.h

Author: kgiusti
Date: Fri Jun 17 20:54:25 2011
New Revision: 1137018

URL: http://svn.apache.org/viewvc?rev=1137018&view=rev
Log:
QPID-3079: move QueueCompletion impl to source

Modified:
    qpid/branches/qpid-3079/qpid/cpp/src/qpid/broker/PersistableQueue.h
    qpid/branches/qpid-3079/qpid/cpp/src/qpid/broker/Queue.cpp
    qpid/branches/qpid-3079/qpid/cpp/src/qpid/broker/Queue.h

Modified: qpid/branches/qpid-3079/qpid/cpp/src/qpid/broker/PersistableQueue.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3079/qpid/cpp/src/qpid/broker/PersistableQueue.h?rev=1137018&r1=1137017&r2=1137018&view=diff
==============================================================================
--- qpid/branches/qpid-3079/qpid/cpp/src/qpid/broker/PersistableQueue.h (original)
+++ qpid/branches/qpid-3079/qpid/cpp/src/qpid/broker/PersistableQueue.h Fri Jun 17 20:54:25 2011
@@ -63,14 +63,14 @@ public:
     
     inline ExternalQueueStore* getExternalQueueStore() const {return externalQueueStore;};
     
-    PersistableQueue():externalQueueStore(NULL) {
+    PersistableQueue():externalQueueStore(NULL){
     };
 
     /** the message has finished being dequeued from the store */
     virtual void dequeueComplete(const boost::intrusive_ptr<PersistableMessage>&) = 0;
     
 protected:
-    ExternalQueueStore *externalQueueStore;
+    ExternalQueueStore* externalQueueStore;
     
 };
 

Modified: qpid/branches/qpid-3079/qpid/cpp/src/qpid/broker/Queue.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3079/qpid/cpp/src/qpid/broker/Queue.cpp?rev=1137018&r1=1137017&r2=1137018&view=diff
==============================================================================
--- qpid/branches/qpid-3079/qpid/cpp/src/qpid/broker/Queue.cpp (original)
+++ qpid/branches/qpid-3079/qpid/cpp/src/qpid/broker/Queue.cpp Fri Jun 17 20:54:25 2011
@@ -1256,3 +1256,21 @@ void Queue::UsageBarrier::destroy()
     parent.deleted = true;
     while (count) parent.messageLock.wait();
 }
+
+
+void Queue::DequeueCompletion::dequeueDone()
+{
+    assert(completionsNeeded.get() > 0);
+    if (--completionsNeeded == 0) {
+        assert(cb);
+        (*cb)(ctxt);
+        ctxt.reset();
+    }
+}
+
+void Queue::DequeueCompletion::registerCallback( callback *f, boost::intrusive_ptr<RefCounted>& _ctxt )
+{
+    cb = f;
+    ctxt = _ctxt;
+    dequeueDone();  // invoke callback if dequeue already done.
+}

Modified: qpid/branches/qpid-3079/qpid/cpp/src/qpid/broker/Queue.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3079/qpid/cpp/src/qpid/broker/Queue.h?rev=1137018&r1=1137017&r2=1137018&view=diff
==============================================================================
--- qpid/branches/qpid-3079/qpid/cpp/src/qpid/broker/Queue.h (original)
+++ qpid/branches/qpid-3079/qpid/cpp/src/qpid/broker/Queue.h Fri Jun 17 20:54:25 2011
@@ -295,22 +295,8 @@ class Queue : public boost::enable_share
           : completionsNeeded(2),  // one for register call, another for done call
           cb(0) {}
 
-        void dequeueDone()
-        {
-            assert(completionsNeeded.get() > 0);
-            if (--completionsNeeded == 0) {
-                assert(cb);
-                (*cb)(ctxt);
-                ctxt.reset();
-            }
-        }
-
-        void registerCallback( callback *f, boost::intrusive_ptr<RefCounted>& _ctxt )
-        {
-            cb = f;
-            ctxt = _ctxt;
-            dequeueDone();  // invoke callback if dequeue already done.
-        }
+        void dequeueDone();
+        void registerCallback( callback *f, boost::intrusive_ptr<RefCounted>& _ctxt );
 
     private:
         mutable qpid::sys::AtomicValue<int> completionsNeeded;



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org