From 3a60db0672b78a75c52f39f5cefeeb00d3eeba97 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 9 Feb 2009 22:25:26 +0000 Subject: Cluster support for message time-to-live. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@742774 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/framing/AMQFrame.h | 4 ++++ cpp/src/qpid/framing/FrameSet.h | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'cpp/src/qpid/framing') diff --git a/cpp/src/qpid/framing/AMQFrame.h b/cpp/src/qpid/framing/AMQFrame.h index 02a1ea4622..028d0c1d8a 100644 --- a/cpp/src/qpid/framing/AMQFrame.h +++ b/cpp/src/qpid/framing/AMQFrame.h @@ -92,6 +92,9 @@ class AMQFrame : public AMQDataBlock, public sys::LatencyMetricTimestamp /** Must point to at least DECODE_SIZE_MIN bytes of data */ static uint16_t decodeSize(char* data); + uint64_t getClusterId() const { return clusterId; } + void setClusterId(uint64_t id) { clusterId = id; } + private: void init(); @@ -103,6 +106,7 @@ class AMQFrame : public AMQDataBlock, public sys::LatencyMetricTimestamp bool bos : 1; bool eos : 1; mutable uint32_t encodedSizeCache; + uint64_t clusterId; // Used to identify frames in a clustered broekr. }; std::ostream& operator<<(std::ostream&, const AMQFrame&); diff --git a/cpp/src/qpid/framing/FrameSet.h b/cpp/src/qpid/framing/FrameSet.h index 82987910a7..b13ca16e97 100644 --- a/cpp/src/qpid/framing/FrameSet.h +++ b/cpp/src/qpid/framing/FrameSet.h @@ -49,6 +49,7 @@ public: bool isComplete() const; uint64_t getContentSize() const; + void getContent(std::string&) const; std::string getContent() const; @@ -73,6 +74,9 @@ public: return header ? header->get() : 0; } + Frames::const_iterator begin() const { return parts.begin(); } + Frames::const_iterator end() const { return parts.end(); } + const SequenceNumber& getId() const { return id; } template void remove(P predicate) { -- cgit v1.2.1