From c017c1cd768a88c7e74076b660be36902059528a 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/qpid@483046 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/lib/broker/SessionHandlerImpl.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cpp/lib/broker/SessionHandlerImpl.cpp') diff --git a/cpp/lib/broker/SessionHandlerImpl.cpp b/cpp/lib/broker/SessionHandlerImpl.cpp index 6d7f5048ea..8757cc2fc3 100644 --- a/cpp/lib/broker/SessionHandlerImpl.cpp +++ b/cpp/lib/broker/SessionHandlerImpl.cpp @@ -35,7 +35,7 @@ SessionHandlerImpl::SessionHandlerImpl(SessionContext* _context, QueueRegistry* _queues, ExchangeRegistry* _exchanges, AutoDelete* _cleaner, - const u_int32_t _timeout) : + const Settings& _settings) : context(_context), // AMQP version management change - kpvdr 2006-11-17 // TODO: Make this class version-aware and link these hard-wired numbers to that version @@ -43,7 +43,7 @@ SessionHandlerImpl::SessionHandlerImpl(SessionContext* _context, queues(_queues), exchanges(_exchanges), cleaner(_cleaner), - timeout(_timeout), + settings(_settings), basicHandler(new BasicHandlerImpl(this)), channelHandler(new ChannelHandlerImpl(this)), connectionHandler(new ConnectionHandlerImpl(this)), @@ -200,7 +200,8 @@ void SessionHandlerImpl::ConnectionHandlerImpl::closeOk(u_int16_t /*channel*/){ void SessionHandlerImpl::ChannelHandlerImpl::open(u_int16_t channel, const string& /*outOfBand*/){ - parent->channels[channel] = new Channel(parent->context, channel, parent->framemax); + parent->channels[channel] = new Channel(parent->context, channel, parent->framemax, + parent->queues->getStore(), parent->settings.stagingThreshold); parent->client.getChannel().openOk(channel); } @@ -262,7 +263,7 @@ void SessionHandlerImpl::QueueHandlerImpl::declare(u_int16_t channel, u_int16_t queue = parent->getQueue(name, channel); } else { std::pair queue_created = - parent->queues->declare(name, durable, autoDelete ? parent->timeout : 0, exclusive ? parent : 0); + parent->queues->declare(name, durable, autoDelete ? parent->settings.timeout : 0, exclusive ? parent : 0); queue = queue_created.first; assert(queue); if (queue_created.second) { // This is a new queue -- cgit v1.2.1