diff options
author | Alan Conway <aconway@apache.org> | 2009-03-02 23:30:08 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2009-03-02 23:30:08 +0000 |
commit | a179ded965c5cc70a0666d07737c38c67c1558c1 (patch) | |
tree | 9c854273164ee106eaa611dd68870d818abfc2c1 /cpp/src/qpid/cluster/Event.h | |
parent | e669e97c7f1c034841986e18288af7629d356aa2 (diff) | |
download | qpid-python-a179ded965c5cc70a0666d07737c38c67c1558c1.tar.gz |
Replicate connection decoder fragments to new members.
Refactoring:
- Merge Decoder into ConnectionMap.
- Process cluster controls in event queue thread.
- Use counter not pointer for connection ID, avoid re-use.
- Do all processing in event queue thread to avoid races
(temporary pending performance measurements)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@749473 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Event.h')
-rw-r--r-- | cpp/src/qpid/cluster/Event.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/src/qpid/cluster/Event.h b/cpp/src/qpid/cluster/Event.h index 1338ea7413..c9f44725df 100644 --- a/cpp/src/qpid/cluster/Event.h +++ b/cpp/src/qpid/cluster/Event.h @@ -24,6 +24,7 @@ #include "types.h" #include "qpid/RefCountedBuffer.h" +#include "qpid/framing/AMQFrame.h" #include "qpid/sys/LatencyMetric.h" #include <sys/uio.h> // For iovec #include <iosfwd> @@ -59,8 +60,8 @@ class EventHeader : public ::qpid::sys::LatencyMetricTimestamp { uint64_t getSequence() const { return sequence; } void setSequence(uint64_t n) { sequence = n; } - bool isCluster() const { return connectionId.getPointer() == 0; } - bool isConnection() const { return connectionId.getPointer() != 0; } + bool isCluster() const { return connectionId.getNumber() == 0; } + bool isConnection() const { return connectionId.getNumber() != 0; } protected: static const size_t HEADER_SIZE; @@ -97,6 +98,8 @@ class Event : public EventHeader { // Store including header char* getStore() { return store; } const char* getStore() const { return store; } + + framing::AMQFrame getFrame() const; operator framing::Buffer() const; |