diff options
author | Matthew Newhook <matthew@zeroc.com> | 2014-09-03 11:01:11 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2014-09-03 11:01:11 -0230 |
commit | 3b0588532354adf7bf3b86e611a8ae4996bfe6ad (patch) | |
tree | 253961cb83af7bc3b1dfc7633a8f934789476cd1 /cpp/src/Ice/Proxy.cpp | |
parent | More work on ICE-2400: the send log thread now uses a separate communicator t... (diff) | |
download | ice-3b0588532354adf7bf3b86e611a8ae4996bfe6ad.tar.bz2 ice-3b0588532354adf7bf3b86e611a8ae4996bfe6ad.tar.xz ice-3b0588532354adf7bf3b86e611a8ae4996bfe6ad.zip |
- C#, Java: Removed Outgoing, fixed generated code to make synchronous
requests using AMI.
- Java: AsyncResult is now an interface.
- Added --arg to allTests.py.
- Fixed operations, adapterDeactivation and metrics test to work with
background IO.
- Added Collocated interrupt test.
- Added support for batch oneway requests using AMI.
- Added test in operations for batch oneway requests using AMI.
Diffstat (limited to 'cpp/src/Ice/Proxy.cpp')
-rw-r--r-- | cpp/src/Ice/Proxy.cpp | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp index 20b04eee154..720099b6927 100644 --- a/cpp/src/Ice/Proxy.cpp +++ b/cpp/src/Ice/Proxy.cpp @@ -1413,8 +1413,8 @@ IceProxy::Ice::Object::ice_getConnection() RequestHandlerPtr handler; try { - handler = __getRequestHandler(false); - return handler->getConnection(true); // Wait for the connection to be established. + handler = __getRequestHandler(); + return handler->waitForConnection(); // Wait for the connection to be established. } catch(const IceInternal::RetryException&) { @@ -1453,7 +1453,7 @@ IceProxy::Ice::Object::ice_getCachedConnection() const { try { - return __handler->getConnection(false); + return __handler->getConnection(); } catch(const LocalException&) { @@ -1668,7 +1668,7 @@ operator<<(ostream& os, const ::IceProxy::Ice::Object& p) } ::IceInternal::RequestHandlerPtr -IceProxy::Ice::Object::__getRequestHandler(bool async) +IceProxy::Ice::Object::__getRequestHandler() { if(_reference->getCacheConnection()) { @@ -1677,12 +1677,11 @@ IceProxy::Ice::Object::__getRequestHandler(bool async) { return _requestHandler; } - _requestHandler = createRequestHandler(true); // async = true to avoid blocking with the proxy mutex locked. + _requestHandler = createRequestHandler(); // async = true to avoid blocking with the proxy mutex locked. return _requestHandler; } - const Reference::Mode mode = _reference->getMode(); - return createRequestHandler(async || mode == Reference::ModeBatchOneway || mode == Reference::ModeBatchDatagram); + return createRequestHandler(); } void @@ -1705,7 +1704,7 @@ IceProxy::Ice::Object::__setRequestHandler(const ::IceInternal::RequestHandlerPt // update the request handler. See bug ICE-5489 for reasons why // this can be useful. // - if(previous->getConnection(false) == _requestHandler->getConnection(false)) + if(previous->getConnection() == _requestHandler->getConnection()) { _requestHandler = handler; } @@ -1725,7 +1724,7 @@ IceProxy::Ice::Object::__newInstance() const } RequestHandlerPtr -IceProxy::Ice::Object::createRequestHandler(bool async) +IceProxy::Ice::Object::createRequestHandler() { if(_reference->getCollocationOptimized()) { @@ -1736,15 +1735,8 @@ IceProxy::Ice::Object::createRequestHandler(bool async) } } - if(async) - { - ConnectRequestHandlerPtr handler = new ::IceInternal::ConnectRequestHandler(_reference, this); - return handler->connect(); - } - else - { - return new ::IceInternal::ConnectionRequestHandler(_reference, this); - } + ConnectRequestHandlerPtr handler = new ::IceInternal::ConnectRequestHandler(_reference, this); + return handler->connect(); } void |