summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/EventFrame.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-02-03 21:28:14 +0000
committerAlan Conway <aconway@apache.org>2009-02-03 21:28:14 +0000
commit729e9ce65125154cfdd2877abc8f7a901ad7caa2 (patch)
tree433e563454062f0ab10705cb1913b0de53558168 /cpp/src/qpid/cluster/EventFrame.h
parent779753f10d0ff1295d1282e367a3973f283ab34f (diff)
downloadqpid-python-729e9ce65125154cfdd2877abc8f7a901ad7caa2.tar.gz
Fix for race conditions in cluster join.
- ConnectionDecoder: separated from Connection. - cluster/PollableQueue: stop processing frames if PollableQueue is stopped. - move state checks in event-queue handler to frame-queue handler. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@740459 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/EventFrame.h')
-rw-r--r--cpp/src/qpid/cluster/EventFrame.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/cpp/src/qpid/cluster/EventFrame.h b/cpp/src/qpid/cluster/EventFrame.h
index 2ef33b9695..7f33cedb5b 100644
--- a/cpp/src/qpid/cluster/EventFrame.h
+++ b/cpp/src/qpid/cluster/EventFrame.h
@@ -32,22 +32,21 @@
namespace qpid {
namespace cluster {
-class Connection;
-
/**
* A frame decoded from an Event.
*/
struct EventFrame
{
+ public:
EventFrame();
- EventFrame(const boost::intrusive_ptr<Connection>& c, const Event& e,
- const framing::AMQFrame& f, int rc=0);
+ EventFrame(const EventHeader& e, const framing::AMQFrame& f, int rc=0);
- bool isCluster() const { return !connection; }
- bool isConnection() const { return connection; }
+ bool isCluster() const { return !connectionId.getPointer(); }
+ bool isConnection() const { return connectionId.getPointer(); }
bool isLastInEvent() const { return readCredit; }
+
// True if this frame follows immediately after frame e.
bool follows(const EventFrame& e) const {
return sequence == e.sequence || (sequence == e.sequence+1 && e.readCredit);
@@ -55,8 +54,7 @@ struct EventFrame
bool operator<(const EventFrame& e) const { return sequence < e.sequence; }
- boost::intrusive_ptr<Connection> connection;
- MemberId member;
+ ConnectionId connectionId;
framing::AMQFrame frame;
uint64_t sequence;
int readCredit; // last frame in an event, give credit when processed.