diff options
author | Gordon Sim <gsim@apache.org> | 2006-12-06 12:01:40 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2006-12-06 12:01:40 +0000 |
commit | c017c1cd768a88c7e74076b660be36902059528a (patch) | |
tree | 027de49a21a56ef7ac3952b7230028ec9c883b90 /cpp/lib/broker/SessionHandlerImpl.cpp | |
parent | 905c59a988010c9db7f64ee90f9d0b6e1011f0d0 (diff) | |
download | qpid-python-c017c1cd768a88c7e74076b660be36902059528a.tar.gz |
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
Diffstat (limited to 'cpp/lib/broker/SessionHandlerImpl.cpp')
-rw-r--r-- | cpp/lib/broker/SessionHandlerImpl.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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::shared_ptr, bool> 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 |