ibessonov commented on a change in pull request #153:
URL: https://github.com/apache/ignite-3/pull/153#discussion_r643842799



##########
File path: 
modules/network/src/main/java/org/apache/ignite/network/internal/recovery/RecoveryClientHandshakeManager.java
##########
@@ -44,23 +44,29 @@
     /** Handshake completion future. */
     private final CompletableFuture<NettySender> handshakeCompleteFuture = new 
CompletableFuture<>();
 
+    /** Message factory. */
+    private final NetworkMessagesFactory messageFactory;
+
     /**
      * Constructor.
      *
      * @param launchId Launch id.
      * @param consistentId Consistent id.
      */
-    public RecoveryClientHandshakeManager(UUID launchId, String consistentId) {
+    public RecoveryClientHandshakeManager(
+        UUID launchId, String consistentId, NetworkMessagesFactory 
messageFactory
+    ) {
         this.launchId = launchId;
         this.consistentId = consistentId;
+        this.messageFactory = messageFactory;
     }
 
     /** {@inheritDoc} */
     @Override public HandshakeAction onMessage(Channel channel, NetworkMessage 
message) {
         if (message instanceof HandshakeStartMessage) {
             HandshakeStartMessage msg = (HandshakeStartMessage) message;
 
-            HandshakeStartResponseMessage response = 
HandshakeMessageFactory.handshakeStartResponseMessage()
+            HandshakeStartResponseMessage response = 
messageFactory.handshakeStartResponseMessage()

Review comment:
       We can discuss it with other guys. People name too many different things 
as "factories". This one is not factory in a traditional meaning. It's more 
like "Replace Constructor with Factory Method" pattern applied to every builder.




-- 
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:
[email protected]


Reply via email to