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



##########
File path: 
modules/configuration/src/main/java/org/apache/ignite/internal/configuration/tree/NamedListNode.java
##########
@@ -201,6 +235,34 @@ public String syntheticKeyName() {
         return syntheticKeyName;
     }
 
+    /**
+     * Sets internal id for the value associated with the passed key. Should 
not be used in arbitrary code. Please refer

Review comment:
       Done

##########
File path: 
modules/configuration/src/main/java/org/apache/ignite/internal/configuration/tree/NamedListNode.java
##########
@@ -201,6 +235,34 @@ public String syntheticKeyName() {
         return syntheticKeyName;
     }
 
+    /**
+     * Sets internal id for the value associated with the passed key. Should 
not be used in arbitrary code. Please refer
+     * to {@link ConfigurationUtil#fillFromPrefixMap(ConstructableTreeNode, 
Map)} for further details on the usage.
+     *
+     * @param key Key to update. Should be present in the named list. Nothing 
will happen if key is missing.
+     * @param id New id to associate with the key.
+     */
+    public void setInternalId(String key, String id) {
+        IgniteBiTuple<String, N> pair = map.get(key);
+
+        if (pair != null)
+            pair.set1(id);
+    }
+
+    /**
+     * Returns internal id for the value associated with the passed key.
+     *
+     * @param key Key.
+     * @return Internal id.
+     *
+     * @throws IllegalArgumentException If {@code key} is not found in the 
named list.
+     */
+    public String internalId(String key) {
+        return 
Optional.ofNullable(map.get(key)).map(IgniteBiTuple::getKey).orElseThrow(

Review comment:
       Done




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