diff options
author | Matthew Newhook <matthew@zeroc.com> | 2006-11-16 06:44:20 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2006-11-16 06:44:20 +0000 |
commit | 1cf08b7d8947437614e65619e17f9853898a7f85 (patch) | |
tree | b80eef7a29df082b7a90ae8e02c85fabb6e58012 /cpp/src/IceStorm/Instance.cpp | |
parent | Remove debug statements (diff) | |
download | ice-1cf08b7d8947437614e65619e17f9853898a7f85.tar.bz2 ice-1cf08b7d8947437614e65619e17f9853898a7f85.tar.xz ice-1cf08b7d8947437614e65619e17f9853898a7f85.zip |
Removed upstream pinging from IceStorm.
Diffstat (limited to 'cpp/src/IceStorm/Instance.cpp')
-rw-r--r-- | cpp/src/IceStorm/Instance.cpp | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/cpp/src/IceStorm/Instance.cpp b/cpp/src/IceStorm/Instance.cpp index c4df7869172..7d473787a3d 100644 --- a/cpp/src/IceStorm/Instance.cpp +++ b/cpp/src/IceStorm/Instance.cpp @@ -11,9 +11,9 @@ #include <IceStorm/BatchFlusher.h> #include <IceStorm/TraceLevels.h> #include <IceStorm/SubscriberPool.h> -#include <IceStorm/KeepAliveThread.h> #include <Ice/Communicator.h> +#include <Ice/Properties.h> using namespace IceStorm; using namespace std; @@ -24,7 +24,11 @@ Instance::Instance( const Ice::ObjectAdapterPtr& adapter) : _communicator(communicator), _adapter(adapter), - _traceLevels(new TraceLevels(name, communicator->getProperties(), communicator->getLogger())) + _traceLevels(new TraceLevels(name, communicator->getProperties(), communicator->getLogger())), + _discardInterval(IceUtil::Time::seconds(communicator->getProperties()->getPropertyAsIntWithDefault( + "IceStorm.Discard.Interval", 60))), // default one minute. + // default one minute. + _sendTimeout(communicator->getProperties()->getPropertyAsIntWithDefault("IceStorm.Send.Timeout", 60 * 1000)) { try { @@ -32,13 +36,13 @@ Instance::Instance( _batchFlusher = new BatchFlusher(this); _subscriberPool = new SubscriberPool(this); - _keepAlive = new KeepAliveThread(this); } catch(...) { shutdown(); destroy(); __setNoDelete(false); + throw; } __setNoDelete(false); @@ -72,12 +76,6 @@ Instance::traceLevels() const return _traceLevels; } -KeepAliveThreadPtr -Instance::keepAlive() const -{ - return _keepAlive; -} - BatchFlusherPtr Instance::batchFlusher() const { @@ -90,15 +88,21 @@ Instance::subscriberPool() const return _subscriberPool; } +IceUtil::Time +Instance::discardInterval() const +{ + return _discardInterval; +} + +int +Instance::sendTimeout() const +{ + return _sendTimeout; +} + void Instance::shutdown() { - if(_keepAlive) - { - _keepAlive->destroy(); - _keepAlive->getThreadControl().join(); - } - if(_batchFlusher) { _batchFlusher->destroy(); @@ -114,7 +118,6 @@ Instance::shutdown() void Instance::destroy() { - _keepAlive = 0; _batchFlusher = 0; _subscriberPool = 0; } |