ibessonov commented on a change in pull request #244:
URL: https://github.com/apache/ignite-3/pull/244#discussion_r681844923
##########
File path:
modules/configuration/src/main/java/org/apache/ignite/internal/configuration/tree/NamedListNode.java
##########
@@ -222,20 +338,62 @@ public void reorderKeys(List<String> orderedKeys) {
/** {@inheritDoc} */
@Override public void construct(String key, ConfigurationSource src) {
if (src == null)
- map.put(key, null);
- else {
- N val = map.get(key);
-
- val = val == null ? valSupplier.get() : (N)val.copy();
-
- map.put(key, val);
-
- src.descend(val);
- }
+ delete(key);
+ else
+ createOrUpdate(key, src::descend);
}
/** {@inheritDoc} */
@Override public NamedListNode<N> copy() {
return new NamedListNode<>(this);
}
+
+ /**
+ * Descriptor for internal named list element representation. Has node
itself and its internal id.
+ *
+ * @param <N> Type of the node.
+ */
+ private static class ElementDescriptor<N extends InnerNode> implements
Cloneable {
+ /** Element's internal id. */
+ public String internalId;
+
+ /** Element node value. */
+ public N value;
+
+ /**
+ * Constructor.
+ *
+ * @param value Node instance.
+ */
+ ElementDescriptor(N value) {
+ this.value = value;
+ internalId = UUID.randomUUID().toString().replace("-", "");
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]