summaryrefslogtreecommitdiff
path: root/cpp/src/IceStorm/Subscriber.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-03-10 18:11:26 +0100
committerBenoit Foucher <benoit@zeroc.com>2017-03-10 18:11:26 +0100
commit0baa07d101186118e89219bdfd33baf1aeb39bc4 (patch)
tree607e57b47105ce65e5b499c30f0058a54ead0322 /cpp/src/IceStorm/Subscriber.cpp
parentFixed ICE-7662 - Use System.Action & System.Func classes (diff)
downloadice-0baa07d101186118e89219bdfd33baf1aeb39bc4.tar.bz2
ice-0baa07d101186118e89219bdfd33baf1aeb39bc4.tar.xz
ice-0baa07d101186118e89219bdfd33baf1aeb39bc4.zip
Fixed ICE-6792 - Added support for connectionCached/locatorCacheTimeout QoS settings
Diffstat (limited to 'cpp/src/IceStorm/Subscriber.cpp')
-rw-r--r--cpp/src/IceStorm/Subscriber.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/cpp/src/IceStorm/Subscriber.cpp b/cpp/src/IceStorm/Subscriber.cpp
index bef2c362b6a..6a12b8509aa 100644
--- a/cpp/src/IceStorm/Subscriber.cpp
+++ b/cpp/src/IceStorm/Subscriber.cpp
@@ -13,6 +13,7 @@
#include <IceStorm/NodeI.h>
#include <IceStorm/Util.h>
#include <Ice/LoggerUtil.h>
+#include <IceUtil/StringUtil.h>
#include <iterator>
using namespace std;
@@ -574,6 +575,31 @@ Subscriber::create(
//
newObj = rec.obj;
}
+
+ p = rec.theQoS.find("locatorCacheTimeout");
+ if(p != rec.theQoS.end())
+ {
+ istringstream is(IceUtilInternal::trim(p->second));
+ int locatorCacheTimeout;
+ if(!(is >> locatorCacheTimeout) || !is.eof())
+ {
+ throw BadQoS("invalid locator cache timeout (numeric value required): " + p->second);
+ }
+ newObj = newObj->ice_locatorCacheTimeout(locatorCacheTimeout);
+ }
+
+ p = rec.theQoS.find("connectionCached");
+ if(p != rec.theQoS.end())
+ {
+ istringstream is(IceUtilInternal::trim(p->second));
+ int connectionCached;
+ if(!(is >> connectionCached) || !is.eof())
+ {
+ throw BadQoS("invalid connection cached setting (numeric value required): " + p->second);
+ }
+ newObj = newObj->ice_connectionCached(connectionCached > 0);
+ }
+
if(reliability == "ordered")
{
if(!newObj->ice_isTwoway())