qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1165884 - in /qpid/branches/qpid-2920-1/qpid/cpp/src/qpid/cluster/exp: EventHandler.cpp HandlerBase.h
Date Tue, 06 Sep 2011 21:46:57 GMT
Author: aconway
Date: Tue Sep  6 21:46:56 2011
New Revision: 1165884

URL: http://svn.apache.org/viewvc?rev=1165884&view=rev
Log:
QPID-2920: pass configuration changes to handlers.

Modified:
    qpid/branches/qpid-2920-1/qpid/cpp/src/qpid/cluster/exp/EventHandler.cpp
    qpid/branches/qpid-2920-1/qpid/cpp/src/qpid/cluster/exp/HandlerBase.h

Modified: qpid/branches/qpid-2920-1/qpid/cpp/src/qpid/cluster/exp/EventHandler.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920-1/qpid/cpp/src/qpid/cluster/exp/EventHandler.cpp?rev=1165884&r1=1165883&r2=1165884&view=diff
==============================================================================
--- qpid/branches/qpid-2920-1/qpid/cpp/src/qpid/cluster/exp/EventHandler.cpp (original)
+++ qpid/branches/qpid-2920-1/qpid/cpp/src/qpid/cluster/exp/EventHandler.cpp Tue Sep  6 21:46:56
2011
@@ -118,6 +118,10 @@ void EventHandler::configChange (
     QPID_LOG(notice, "cluster: new membership: " << PrintAddrs(members, nMembers));
     QPID_LOG_IF(notice, nLeft, "cluster:   members left: " << PrintAddrs(left, nLeft));
     QPID_LOG_IF(notice, nJoined, "cluster:   members joined: " << PrintAddrs(joined,
nJoined));
+    for (Handlers::iterator i = handlers.begin(); i != handlers.end(); ++i) {
+        for (int l = 0; l < nLeft; ++l) (*i)->left(left[l]);
+        for (int j = 0; j < nJoined; ++j) (*i)->joined(joined[j]);
+    }
 }
 
 }} // namespace qpid::cluster

Modified: qpid/branches/qpid-2920-1/qpid/cpp/src/qpid/cluster/exp/HandlerBase.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920-1/qpid/cpp/src/qpid/cluster/exp/HandlerBase.h?rev=1165884&r1=1165883&r2=1165884&view=diff
==============================================================================
--- qpid/branches/qpid-2920-1/qpid/cpp/src/qpid/cluster/exp/HandlerBase.h (original)
+++ qpid/branches/qpid-2920-1/qpid/cpp/src/qpid/cluster/exp/HandlerBase.h Tue Sep  6 21:46:56
2011
@@ -42,6 +42,8 @@ class HandlerBase
     virtual ~HandlerBase();
 
     virtual bool invoke(const framing::AMQBody& body) = 0;
+    virtual void left(const MemberId&) {}
+    virtual void joined(const MemberId&) {}
 
   protected:
     EventHandler& eventHandler;



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


Mime
View raw message