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/SessionHandlerFactoryImpl.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/SessionHandlerFactoryImpl.cpp')
-rw-r--r-- | cpp/lib/broker/SessionHandlerFactoryImpl.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cpp/lib/broker/SessionHandlerFactoryImpl.cpp b/cpp/lib/broker/SessionHandlerFactoryImpl.cpp index 2cc09a67e0..1b5441e3cf 100644 --- a/cpp/lib/broker/SessionHandlerFactoryImpl.cpp +++ b/cpp/lib/broker/SessionHandlerFactoryImpl.cpp @@ -39,9 +39,9 @@ const std::string amq_fanout("amq.fanout"); const std::string amq_match("amq.match"); } -SessionHandlerFactoryImpl::SessionHandlerFactoryImpl(const std::string& _store, u_int32_t _timeout) : +SessionHandlerFactoryImpl::SessionHandlerFactoryImpl(const std::string& _store, u_int64_t _stagingThreshold, u_int32_t _timeout) : store(_store.empty() ? (MessageStore*) new NullMessageStore() : (MessageStore*) new MessageStoreModule(_store)), - queues(store.get()), timeout(_timeout), cleaner(&queues, timeout/10) + queues(store.get()), settings(_timeout, _stagingThreshold), cleaner(&queues, _timeout/10) { exchanges.declare(empty, DirectExchange::typeName); // Default exchange. exchanges.declare(amq_direct, DirectExchange::typeName); @@ -51,7 +51,8 @@ SessionHandlerFactoryImpl::SessionHandlerFactoryImpl(const std::string& _store, if(store.get()) { RecoveryManager recoverer(queues, exchanges); - store->recover(recoverer); + MessageStoreSettings storeSettings = { settings.stagingThreshold }; + store->recover(recoverer, &storeSettings); } cleaner.start(); @@ -59,7 +60,7 @@ SessionHandlerFactoryImpl::SessionHandlerFactoryImpl(const std::string& _store, SessionHandler* SessionHandlerFactoryImpl::create(SessionContext* ctxt) { - return new SessionHandlerImpl(ctxt, &queues, &exchanges, &cleaner, timeout); + return new SessionHandlerImpl(ctxt, &queues, &exchanges, &cleaner, settings); } SessionHandlerFactoryImpl::~SessionHandlerFactoryImpl() |