summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Event.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-01-20 22:11:37 +0000
committerAlan Conway <aconway@apache.org>2009-01-20 22:11:37 +0000
commit066fd1ab9f1840cfe09204bc5f3d550f1e12d49b (patch)
tree51c9961e79c811c3240710bd7b7435a73e11c2b7 /cpp/src/qpid/cluster/Event.h
parent861692abf515cf136e86e70446d005e7849a0f87 (diff)
downloadqpid-python-066fd1ab9f1840cfe09204bc5f3d550f1e12d49b.tar.gz
Latency measurements, compiled out of production code.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@736135 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Event.h')
-rw-r--r--cpp/src/qpid/cluster/Event.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/cpp/src/qpid/cluster/Event.h b/cpp/src/qpid/cluster/Event.h
index 32e8f5e07b..110ec524c7 100644
--- a/cpp/src/qpid/cluster/Event.h
+++ b/cpp/src/qpid/cluster/Event.h
@@ -27,6 +27,8 @@
#include "Connection.h"
#include "qpid/RefCountedBuffer.h"
#include "qpid/framing/Buffer.h"
+#include "qpid/sys/LatencyMetric.h"
+#include <sys/uio.h> // For iovec
#include <iosfwd>
namespace qpid {
@@ -37,7 +39,7 @@ namespace cluster {
//
/** Header data for a multicast event */
-class EventHeader {
+class EventHeader : public ::qpid::sys::LatencyMetricTimestamp {
public:
EventHeader(EventType t=DATA, const ConnectionId& c=ConnectionId(), size_t size=0);
void decode(const MemberId& m, framing::Buffer&);
@@ -65,8 +67,9 @@ class EventHeader {
*/
class Event : public EventHeader {
public:
+ Event();
/** Create an event with a buffer that can hold size bytes plus an event header. */
- Event(EventType t=DATA, const ConnectionId& c=ConnectionId(), size_t size=0);
+ Event(EventType t, const ConnectionId& c, size_t);
/** Create an event copied from delivered data. */
static Event decodeCopy(const MemberId& m, framing::Buffer&);
@@ -85,6 +88,8 @@ class Event : public EventHeader {
operator framing::Buffer() const;
+ iovec toIovec();
+
private:
void encodeHeader();