xyuanlu commented on code in PR #2291:
URL: https://github.com/apache/helix/pull/2291#discussion_r1030105405


##########
meta-client/src/main/java/org/apache/helix/metaclient/factories/MetaClientConfig.java:
##########
@@ -56,56 +69,81 @@ public StoreType getStoreType() {
   //  private RetryProtocol _retryProtocol;
 
 
-  private MetaClientConfig(String connectionAddress, long connectionTimeout, 
boolean enableAuth,
-      StoreType storeType) {
+  protected MetaClientConfig(String connectionAddress, long 
connectionInitTimeout,
+      long sessionTimeout, boolean enableAuth, StoreType storeType) {
     _connectionAddress = connectionAddress;
-    _connectionTimeout = connectionTimeout;
+    _connectionInitTimeout = connectionInitTimeout;
+    _sessionTimeout = sessionTimeout;
     _enableAuth = enableAuth;
     _storeType = storeType;
   }
 
-  public static class Builder {
-    private String _connectionAddress;
-
-    private long _connectionTimeout;
-    private boolean _enableAuth;
-    //private RetryProtocol _retryProtocol;
-    private StoreType _storeType;
+  public static class MetaClientConfigBuilder<B extends 
MetaClientConfigBuilder<B>> {

Review Comment:
   If we are not using generics with builder, calling setter function defined 
in base class will returns a bace class object instead.
   
   ```
   ZkMetaClientConfigBuilder.setAuthEnabled(true).setZkSerializer(serializer)
   ```
   will throw exception. 
   
   https://stackoverflow.com/questions/17164375/subclassing-a-java-builder-class



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to