/** * By default setPRSingleHopEnabled is <code>true</code> in which case the client is aware of the * location of partitions on servers hosting {@link Region regions} with * {@link org.apache.geode.cache.DataPolicy#PARTITION}. Using this information, the client routes * the client cache operations directly to the server which is hosting the required partition for * the cache operation using a single network hop. This mode works best when * {@link #setPoolMaxConnections(int)} is set to <code>-1</code> which is the default. This mode * causes the client to have more connections to the servers. * <p> * If setPRSingleHopEnabled is <code>false</code> the client may need to do an extra network hop * on servers to go to the required partition for that cache operation. The client will use fewer * network connections to the servers. * <p> * Caution: for {@link org.apache.geode.cache.DataPolicy#PARTITION partition} regions with * {@link org.apache.geode.cache.PartitionAttributesFactory#setLocalMaxMemory(int) * local-max-memory} equal to zero, no cache operations mentioned above will be routed to those * servers as they do not host any partitions. * * @return the newly created pool. */ public ClientCacheFactory setPoolPRSingleHopEnabled(boolean enabled) { getPoolFactory().setPRSingleHopEnabled(enabled); return this; }
f.setPRSingleHopEnabled(parseBoolean(v));
.thenAnswer(newSetter(pingInterval, mockPoolFactory)); when(mockPoolFactory.setPRSingleHopEnabled(anyBoolean())) .thenAnswer(newSetter(prSingleHopEnabled, mockPoolFactory));
mockPoolFactory.setPRSingleHopEnabled(invocation.getArgument(0)); return clientCacheFactorySpy; }).when(clientCacheFactorySpy).setPoolPRSingleHopEnabled(anyBoolean());
it.setMultiuserAuthentication(this.multiUserAuthentication); it.setPingInterval(this.pingInterval); it.setPRSingleHopEnabled(this.prSingleHopEnabled); it.setReadTimeout(this.readTimeout); it.setRetryAttempts(this.retryAttempts);
it.setMultiuserAuthentication(this.multiUserAuthentication); it.setPingInterval(this.pingInterval); it.setPRSingleHopEnabled(this.prSingleHopEnabled); it.setReadTimeout(this.readTimeout); it.setRetryAttempts(this.retryAttempts);