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



##########
File path: 
modules/api/src/main/java/org/apache/ignite/configuration/schemas/network/NetworkConfigurationSchema.java
##########
@@ -17,24 +17,28 @@
 
 package org.apache.ignite.configuration.schemas.network;
 
+import org.apache.ignite.configuration.annotation.ConfigValue;
 import org.apache.ignite.configuration.annotation.ConfigurationRoot;
 import org.apache.ignite.configuration.annotation.ConfigurationType;
-import org.apache.ignite.configuration.annotation.Value;
-import org.apache.ignite.configuration.validation.Max;
-import org.apache.ignite.configuration.validation.Min;
 
 /**
  * Configuration schema for network endpoint subtree.
  */
 @ConfigurationRoot(rootName = "network", type = ConfigurationType.LOCAL)
 public class NetworkConfigurationSchema {
-    /** Network port. */
-    @Min(1024)
-    @Max(0xFFFF)
-    @Value(hasDefault = true)
-    public final int port = 47500;
+    /** Server configuration. */
+    @ConfigValue
+    public final ServerConfigurationSchema server = new 
ServerConfigurationSchema();
 
-    /** Cluster nodes. */
-    @Value(hasDefault = true)
-    public final String[] netClusterNodes = new String[0];
+    /** Client configuration. */
+    @ConfigValue
+    public final ClientConfigurationSchema client = new 
ClientConfigurationSchema();

Review comment:
       Why do you instantiate objects here? No one will ever use them. Even 
worse, this will lead to a lot of unnecessary allocations because schema 
objects are being allocated constantly during configuration updates




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


Reply via email to