pivotal-jbarrett commented on code in PR #7493:
URL: https://github.com/apache/geode/pull/7493#discussion_r859066023
##########
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/execute/PRClientServerTestBase.java:
##########
@@ -368,6 +377,33 @@ private static void createNoSingleHopCacheClient(String
host, Integer port1, Int
assertNotNull(region);
}
+ private static void createNoSingleHopCacheClient(String host,
+ Integer port1, Integer port2, Integer port3, int connectTimeout) {
+ CacheServerTestUtil.disableShufflingOfEndpoints();
+
+ Pool p;
+ try {
+ PoolFactory factory = PoolManager.createFactory().addServer(host, port1)
+ .addServer(host, port2).addServer(host, port3).setPingInterval(2000)
+ .setSubscriptionEnabled(true).setReadTimeout(2000)
+ .setSocketBufferSize(1000).setRetryAttempts(0)
+ .setSocketConnectTimeout(connectTimeout)
+ .setPRSingleHopEnabled(false);
+
+ p = factory.create("PRClientServerTestBase");
+ } finally {
+ CacheServerTestUtil.enableShufflingOfEndpoints();
+ }
+ pool = (PoolImpl) p;
+ AttributesFactory factory = new AttributesFactory();
Review Comment:
If you aren't calling any of the methods on this instance that have matching
typed parameters then you can get away with `?` but as soon as you try to
invoke one with a value that does match type `?` it will fail to compile. Java!
Better type templating is coming...
My general rule is use `?` when you don't care or know the type, use
per-method generics when the type matters but is not know, use `Object` when
the type matters and it doesn't have any other common ancestor or we don't know
all the possible types.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]