diff options
author | Michi Henning <michi@zeroc.com> | 2003-08-29 06:51:58 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2003-08-29 06:51:58 +0000 |
commit | 14e46bc24e79df49bd603c08d293c17245b9ca93 (patch) | |
tree | c7fc6f422c2a0706ed5e3926a091aa715ee41021 /cpp/src/Ice/ConnectionFactory.cpp | |
parent | connection closure timeout (diff) | |
download | ice-14e46bc24e79df49bd603c08d293c17245b9ca93.tar.bz2 ice-14e46bc24e79df49bd603c08d293c17245b9ca93.tar.xz ice-14e46bc24e79df49bd603c08d293c17245b9ca93.zip |
Removed ice_flush() from proxy base class and implemented
Communicator::flushBatchRequests().
Diffstat (limited to 'cpp/src/Ice/ConnectionFactory.cpp')
-rw-r--r-- | cpp/src/Ice/ConnectionFactory.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp index 6661b7322b2..ae99f562611 100644 --- a/cpp/src/Ice/ConnectionFactory.cpp +++ b/cpp/src/Ice/ConnectionFactory.cpp @@ -380,6 +380,23 @@ IceInternal::OutgoingConnectionFactory::removeAdapter(const ObjectAdapterPtr& ad } } +void +IceInternal::OutgoingConnectionFactory::flushBatchRequests() +{ + list<ConnectionPtr> c; + { + IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); + + for(std::multimap<EndpointPtr, ConnectionPtr>::const_iterator p = _connections.begin(); + p != _connections.end(); + ++p) + { + c.push_back(p->second); + } + } + for_each(c.begin(), c.end(), Ice::voidMemFun(&Connection::flushBatchRequest)); +} + IceInternal::OutgoingConnectionFactory::OutgoingConnectionFactory(const InstancePtr& instance) : _instance(instance), _destroyed(false) @@ -493,6 +510,13 @@ IceInternal::IncomingConnectionFactory::connections() const return result; } +void +IceInternal::IncomingConnectionFactory::flushBatchRequests() +{ + list<ConnectionPtr> c = connections(); // connections() is synchronized, so need to synchronize here. + for_each(c.begin(), c.end(), Ice::voidMemFun(&Connection::flushBatchRequest)); +} + bool IceInternal::IncomingConnectionFactory::datagram() const { |