summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Connection.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-01-21 20:40:38 +0000
committerAlan Conway <aconway@apache.org>2009-01-21 20:40:38 +0000
commit35c504c10c6f5ae94216a4173c035720acec297e (patch)
tree65c9aee831c5a92f9074d9ec0ece1b12ecc403b1 /cpp/src/qpid/cluster/Connection.h
parent3924106491c2fbfc05f5cbf4dbdeccc51c903cf2 (diff)
downloadqpid-python-35c504c10c6f5ae94216a4173c035720acec297e.tar.gz
cluster: Pipeline decoding. About 10% improvement in latency and throughput.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@736409 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Connection.h')
-rw-r--r--cpp/src/qpid/cluster/Connection.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/cpp/src/qpid/cluster/Connection.h b/cpp/src/qpid/cluster/Connection.h
index 8a8aa86c57..ec46d62cc2 100644
--- a/cpp/src/qpid/cluster/Connection.h
+++ b/cpp/src/qpid/cluster/Connection.h
@@ -26,6 +26,8 @@
#include "WriteEstimate.h"
#include "OutputInterceptor.h"
#include "NoOpConnectionOutputHandler.h"
+#include "Event.h"
+#include "EventFrame.h"
#include "qpid/broker/Connection.h"
#include "qpid/amqp_0_10/Connection.h"
@@ -49,6 +51,7 @@ class TxAccept;
namespace cluster {
class Cluster;
+class Event;
/** Intercept broker::Connection calls for shadow and local cluster connections. */
class Connection :
@@ -58,6 +61,8 @@ class Connection :
{
public:
+ typedef sys::PollableQueue<EventFrame> EventFrameQueue;
+
/** Local connection, use this in ConnectionId */
Connection(Cluster&, sys::ConnectionOutputHandler& out, const std::string& id, MemberId, bool catchUp);
/** Shadow connection */
@@ -96,8 +101,8 @@ class Connection :
size_t decode(const char* buffer, size_t size);
// Called for data delivered from the cluster.
- void deliverBuffer(framing::Buffer&);
- void delivered(framing::AMQFrame&);
+ void deliveredEvent(const Event&, EventFrameQueue&);
+ void deliveredFrame(const EventFrame&);
void consumerState(const std::string& name, bool blocked, bool notifyEnabled);
@@ -166,6 +171,7 @@ class Connection :
framing::SequenceNumber deliverSeq;
framing::ChannelId currentChannel;
boost::shared_ptr<broker::TxBuffer> txBuffer;
+ int readCredit;
friend std::ostream& operator<<(std::ostream&, const Connection&);
};