ChenSammi commented on code in PR #4390:
URL: https://github.com/apache/ozone/pull/4390#discussion_r1138135847


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/security/ssl/PemFileBasedKeyStoresFactory.java:
##########
@@ -44,87 +45,48 @@
  */
 @InterfaceAudience.Private
 @InterfaceStability.Evolving
-public class PemFileBasedKeyStoresFactory implements KeyStoresFactory {
+public class PemFileBasedKeyStoresFactory implements KeyStoresFactory,
+    CertificateNotification {
 
   private static final Logger LOG =
       LoggerFactory.getLogger(PemFileBasedKeyStoresFactory.class);
 
-  /**
-   * The name of the timer thread monitoring file changes.
-   */
-  public static final String SSL_MONITORING_THREAD_NAME =
-      "SSL Certificates Store Monitor";
-
   /**
    * Default format of the keystore files.
    */
   public static final String DEFAULT_KEYSTORE_TYPE = "jks";
 
-  private KeyManager[] keyManagers;
-  private TrustManager[] trustManagers;
-  private Timer monitoringTimer;
+  private AtomicReference<KeyManager[]> keyManagers;
+  private AtomicReference<TrustManager[]> trustManagers;

Review Comment:
   @fapifta , thanks for the review.
   
   AtomicReference is not a must to have. I will revert it in next new patch.  
As for the array type, it's because the underlying APIs return and array. 
   
   



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