sashapolo commented on a change in pull request #67:
URL: https://github.com/apache/ignite-3/pull/67#discussion_r596027153



##########
File path: 
modules/configuration/src/main/java/org/apache/ignite/configuration/internal/validation/ValidationContextImpl.java
##########
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.configuration.internal.validation;
+
+import java.util.List;
+import java.util.function.Function;
+import org.apache.ignite.configuration.RootKey;
+import org.apache.ignite.configuration.internal.RootsNode;
+import org.apache.ignite.configuration.tree.InnerNode;
+import org.apache.ignite.configuration.tree.TraversableTreeNode;
+import org.apache.ignite.configuration.validation.ValidationContext;
+import org.apache.ignite.configuration.validation.ValidationIssue;
+
+import static 
org.apache.ignite.configuration.internal.util.ConfigurationUtil.find;
+
+/**
+ * Validation context implementation.
+ */
+class ValidationContextImpl<VIEW> implements ValidationContext<VIEW> {
+    /** Cached storage roots with the current version of data. */
+    private final RootsNode oldRoots;
+
+    /** Updated values that need to be validated. */
+    private final RootsNode newRoots;
+
+    /** Provider for arbitrary roots that might not be accociated with the 
same storage. */
+    private final Function<RootKey<?, ?>, InnerNode> otherRoots;
+
+    /**
+     * Current node/configuration value.
+     *
+     * @see #getNewValue()
+     */
+    private final VIEW val;
+
+    /** */
+    private final String currentKey;
+
+    /** */
+    private final List<String> currentPath;
+
+    /** */
+    private final List<ValidationIssue> issues;
+
+    /**
+     * Constructor.
+     *  @param oldRoots Old roots.
+     * @param newRoots New roots.
+     * @param otherRoots Provider for arbitrary roots that might not be 
accociated with the same storage.
+     * @param val New value of currently validated configuration.
+     * @param currentKey Key corresponding to the value.
+     * @param currentPath Key corresponding to the value.

Review comment:
       looks like a copy-paste typo

##########
File path: 
modules/configuration/src/main/java/org/apache/ignite/configuration/validation/Validator.java
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.configuration.validation;
+
+import java.lang.annotation.Annotation;
+import org.apache.ignite.configuration.ConfigurationRegistry;
+
+/**
+ * Interface for all configuration validators class. Recommended to be a 
stateless class.

Review comment:
       ```suggestion
    * Interface for all configuration validators. Recommended to be a stateless 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to