qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1494646 - in /qpid/trunk/qpid/cpp/src/qpid/broker: Queue.cpp Queue.h
Date Wed, 19 Jun 2013 14:52:11 GMT
Author: gsim
Date: Wed Jun 19 14:52:11 2013
New Revision: 1494646

URL: http://svn.apache.org/r1494646
Log:
NO-JIRA: remove unused code

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp
    qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp?rev=1494646&r1=1494645&r2=1494646&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp Wed Jun 19 14:52:11 2013
@@ -178,8 +178,6 @@ Queue::Queue(const string& _name, const 
     consumerCount(0),
     browserCount(0),
     exclusive(0),
-    persistLastNode(false),
-    inLastNodeFailure(false),
     messages(new MessageDeque()),
     persistenceId(0),
     settings(b ? merge(_settings, b->getOptions()) : _settings),
@@ -795,31 +793,6 @@ bool Queue::canAutoDelete() const
     return settings.autodelete && !consumerCount && !owner;
 }
 
-void Queue::clearLastNodeFailure()
-{
-    inLastNodeFailure = false;
-}
-
-void Queue::forcePersistent(const Message& /*message*/)
-{
-    //TODO
-}
-
-void Queue::setLastNodeFailure()
-{
-    if (persistLastNode){
-        Mutex::ScopedLock locker(messageLock);
-        try {
-            messages->foreach(boost::bind(&Queue::forcePersistent, this, _1));
-        } catch (const std::exception& e) {
-            // Could not go into last node standing (for example journal not large enough)
-            QPID_LOG(error, "Unable to fail to last node standing for queue: " << name
<< " : " << e.what());
-        }
-        inLastNodeFailure = true;
-    }
-}
-
-
 /*
  * return true if enqueue succeeded and message should be made
  * available; returning false will result in the message being dropped
@@ -837,10 +810,6 @@ bool Queue::enqueue(TransactionContext* 
         }
     }
 
-    if (inLastNodeFailure && persistLastNode){
-        forcePersistent(msg);
-    }
-
     if (settings.traceId.size()) {
         msg.addTraceId(settings.traceId);
     }

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h?rev=1494646&r1=1494645&r2=1494646&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h Wed Jun 19 14:52:11 2013
@@ -129,8 +129,6 @@ class Queue : public boost::enable_share
     uint32_t consumerCount;     // Actually a count of all subscriptions, acquiring or not.
     uint32_t browserCount;      // Count of non-acquiring subscriptions.
     OwnershipToken* exclusive;
-    bool persistLastNode;
-    bool inLastNodeFailure;
     std::vector<std::string> traceExclude;
     QueueListeners listeners;
     std::auto_ptr<Messages> messages;
@@ -200,7 +198,6 @@ class Queue : public boost::enable_share
     bool acquire(const qpid::framing::SequenceNumber& position, Message& msg,
                  const qpid::sys::Mutex::ScopedLock& locker);
 
-    void forcePersistent(const Message& msg);
     int getEventMode();
     void dequeueFromStore(boost::intrusive_ptr<PersistableMessage>);
     void abandoned(const Message& message);
@@ -314,12 +311,6 @@ class Queue : public boost::enable_share
     const QueueBindings& getBindings() const { return bindings; }
 
     /**
-     * used to take messages from in memory and flush down to disk.
-     */
-    QPID_BROKER_EXTERN void setLastNodeFailure();
-    QPID_BROKER_EXTERN void clearLastNodeFailure();
-
-    /**
      * dequeue from store (only done once messages is acknowledged)
      */
     QPID_BROKER_EXTERN void dequeue(TransactionContext* ctxt, const QueueCursor&);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message