From 5ee8574ae432294f56f60ced5cfde3082cfd2dba Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Wed, 6 Dec 2006 12:01:40 +0000 Subject: Added new configuration option for staging threshold (size above which messages will be written to disk as content arrives rather than accumulating that content in memory). Pass this through to all channels and to the store on recovery. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@483046 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/lib/broker/SessionHandlerImpl.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'qpid/cpp/lib/broker/SessionHandlerImpl.h') diff --git a/qpid/cpp/lib/broker/SessionHandlerImpl.h b/qpid/cpp/lib/broker/SessionHandlerImpl.h index 4b89dbeaa1..98c87a7806 100644 --- a/qpid/cpp/lib/broker/SessionHandlerImpl.h +++ b/qpid/cpp/lib/broker/SessionHandlerImpl.h @@ -60,6 +60,14 @@ struct ConnectionException : public std::exception { const char* what() const throw() { return text.c_str(); } }; +class Settings { +public: + const u_int32_t timeout;//timeout for auto-deleted queues (in ms) + const u_int64_t stagingThreshold; + + Settings(u_int32_t _timeout, u_int64_t _stagingThreshold) : timeout(_timeout), stagingThreshold(_stagingThreshold) {} +}; + class SessionHandlerImpl : public virtual qpid::sys::SessionHandler, public virtual qpid::framing::AMQP_ServerOperations, public virtual ConnectionToken @@ -72,7 +80,7 @@ class SessionHandlerImpl : public virtual qpid::sys::SessionHandler, QueueRegistry* queues; ExchangeRegistry* const exchanges; AutoDelete* const cleaner; - const u_int32_t timeout;//timeout for auto-deleted queues (in ms) + const Settings settings; std::auto_ptr basicHandler; std::auto_ptr channelHandler; @@ -104,7 +112,7 @@ class SessionHandlerImpl : public virtual qpid::sys::SessionHandler, public: SessionHandlerImpl(qpid::sys::SessionContext* context, QueueRegistry* queues, - ExchangeRegistry* exchanges, AutoDelete* cleaner, const u_int32_t timeout); + ExchangeRegistry* exchanges, AutoDelete* cleaner, const Settings& settings); virtual void received(qpid::framing::AMQFrame* frame); virtual void initiated(qpid::framing::ProtocolInitiation* header); virtual void idleOut(); -- cgit v1.2.1