diff options
| author | Alan Conway <aconway@apache.org> | 2008-10-14 18:21:50 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-10-14 18:21:50 +0000 |
| commit | b17ea7f64cf3eb42c4614aa57508a7aaca132807 (patch) | |
| tree | 3f79c52e3b96a19cb0ce6b591b5ea64284c41cad /cpp/src/qpid/client/FailoverSubscriptionManager.h | |
| parent | 8ec6597d5372ccebb689483b8074085f278022e1 (diff) | |
| download | qpid-python-b17ea7f64cf3eb42c4614aa57508a7aaca132807.tar.gz | |
Bug fixes for client-side failover.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@704596 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/FailoverSubscriptionManager.h')
| -rw-r--r-- | cpp/src/qpid/client/FailoverSubscriptionManager.h | 45 |
1 files changed, 13 insertions, 32 deletions
diff --git a/cpp/src/qpid/client/FailoverSubscriptionManager.h b/cpp/src/qpid/client/FailoverSubscriptionManager.h index 8678f5683c..651e2549c2 100644 --- a/cpp/src/qpid/client/FailoverSubscriptionManager.h +++ b/cpp/src/qpid/client/FailoverSubscriptionManager.h @@ -33,7 +33,7 @@ #include <qpid/client/LocalQueue.h> #include <qpid/client/FlowControl.h> #include <qpid/sys/Runnable.h> -#include <qpid/sys/Mutex.h> +#include <qpid/sys/Monitor.h> @@ -48,25 +48,27 @@ class FailoverSubscriptionManager FailoverSubscriptionManager ( FailoverSession * fs ); - void foo ( int& arg_1 ); - void subscribe ( MessageListener & listener, const std::string & queue, const FlowControl & flow, - const std::string & tag = std::string() ); + const std::string & tag = std::string(), + bool record_this = true ); void subscribe ( LocalQueue & localQueue, const std::string & queue, const FlowControl & flow, - const std::string & tag=std::string()); + const std::string & tag=std::string(), + bool record_this = true ); void subscribe ( MessageListener & listener, const std::string & queue, - const std::string & tag = std::string()); + const std::string & tag = std::string(), + bool record_this = true ); void subscribe ( LocalQueue & localQueue, const std::string & queue, - const std::string & tag=std::string()); + const std::string & tag=std::string(), + bool record_this = true ); bool get ( Message & result, const std::string & queue, @@ -115,9 +117,9 @@ class FailoverSubscriptionManager std::string name; + private: - typedef sys::Mutex::ScopedLock Lock; - sys::Mutex lock; + sys::Monitor lock; SubscriptionManager * subscriptionManager; @@ -130,32 +132,11 @@ class FailoverSubscriptionManager Session newSession; bool newSessionIsValid; + bool no_failover; + - /* - * */ typedef boost::function<void ()> subscribeFn; std::vector < subscribeFn > subscribeFns; - - struct subscribeArgs - { - int interface; - MessageListener * listener; - LocalQueue * localQueue; - const std::string * queue; - const FlowControl * flow; - const std::string * tag; - - subscribeArgs ( int _interface, - MessageListener *, - LocalQueue *, - const std::string *, - const FlowControl *, - const std::string * - ); - }; - - std::vector < subscribeArgs * > subscriptionReplayVector; - }; }} // namespace qpid::client |
