From 818103f8ae3f2903792243fb1467be22c6f3f6f5 Mon Sep 17 00:00:00 2001 From: Matthew Davis Date: Sat, 12 Nov 2022 09:41:22 -0500 Subject: [PATCH] set min idle 4, max connections between nodes to 64, and fix deprecation warning --- .../io/zulia/server/connection/client/InternalClient.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zulia-server/src/main/java/io/zulia/server/connection/client/InternalClient.java b/zulia-server/src/main/java/io/zulia/server/connection/client/InternalClient.java index 59572955..f7e82c59 100644 --- a/zulia-server/src/main/java/io/zulia/server/connection/client/InternalClient.java +++ b/zulia-server/src/main/java/io/zulia/server/connection/client/InternalClient.java @@ -18,6 +18,7 @@ import io.zulia.server.connection.client.handler.InternalStoreHandler; import org.apache.commons.pool2.impl.GenericObjectPool; +import java.time.Duration; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Level; import java.util.logging.Logger; @@ -79,9 +80,9 @@ public void addNode(Node node) { GenericObjectPool pool = new GenericObjectPool<>( new InternalRpcConnectionFactory(node.getServerAddress(), node.getServicePort())); - pool.setMinIdle(1); - pool.setMaxTotal(8); - pool.setMinEvictableIdleTimeMillis(1000L * 60L * 5L); + pool.setMinIdle(4); + pool.setMaxTotal(64); + pool.setMinEvictableIdle(Duration.ofMinutes(5)); internalConnectionPoolMap.putIfAbsent(nodeKey, pool); }