javeme commented on code in PR #133:
URL: 
https://github.com/apache/incubator-hugegraph-commons/pull/133#discussion_r1400372640


##########
hugegraph-common/src/main/java/org/apache/hugegraph/rest/RestHeaders.java:
##########
@@ -77,4 +77,18 @@ public boolean equals(Object obj) {
     public okhttp3.Headers toOkHttpHeader() {
         return this.headersBuilder.build();
     }
+
+    public static class HttpHeadersConstant {

Review Comment:
   prefer to merge these vars into class RestHeaders



##########
hugegraph-common/src/main/java/org/apache/hugegraph/rest/RestClientConfig.java:
##########
@@ -34,8 +34,8 @@ public class RestClientConfig {
     private Integer timeout;
     private Integer maxConns;
     private Integer maxConnsPerRoute;
-    private Integer idleTime = 5;
-    private TimeUnit idleTimeUnit = TimeUnit.MINUTES;
+    private Integer idleTime = 30;
+    private TimeUnit idleTimeUnit = TimeUnit.SECONDS;

Review Comment:
   seems don't need to add a var for the unit, prefer to just hardcode it



##########
hugegraph-common/src/main/java/org/apache/hugegraph/rest/AbstractRestClient.java:
##########
@@ -184,7 +186,7 @@ private OkHttpClient buildOkHttpClient(RestClientConfig 
config) {
         if (config.getMaxIdleConns() != null || config.getIdleTime() != null) {
             ConnectionPool connectionPool = new 
ConnectionPool(config.getMaxIdleConns(),
                                                                
config.getIdleTime(),
-                                                               
TimeUnit.MINUTES);
+                                                               
config.getIdleTimeUnit());

Review Comment:
   we can just hardcode TimeUnit.SECONDS here



-- 
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: dev-unsubscr...@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to