narendly commented on a change in pull request #367: Add transient cache for 
CustomRestClient implementation
URL: https://github.com/apache/helix/pull/367#discussion_r309477945
 
 

 ##########
 File path: 
helix-rest/src/main/java/org/apache/helix/rest/client/CustomRestClientFactory.java
 ##########
 @@ -33,34 +33,37 @@
 public class CustomRestClientFactory {
   private static final Logger LOG = 
LoggerFactory.getLogger(CustomRestClientFactory.class);
 
-  private static CustomRestClient INSTANCE = null;
+  private static HttpClient HTTP_CLIENT_INSTANCE = null;
 
   private CustomRestClientFactory() {
   }
 
+  /**
+   * Not using singleton pattern because {@link CustomRestClientImpl} has a 
transient memory cache with lifecycle of one
 
 Review comment:
   Clarify this: we are not using the singleton for CustomRestClient but we are 
using a singleton HttpClient. The reason for not making CustomRestClient a 
singleton is because it contains extra member variables whose lifecycle is tied 
to the lifecycle of each REST request.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to