sergey-chugunov-1985 commented on a change in pull request #56:
URL: https://github.com/apache/ignite-3/pull/56#discussion_r582622447
##########
File path:
modules/configuration/src/main/java/org/apache/ignite/configuration/internal/DynamicConfiguration.java
##########
@@ -108,43 +85,50 @@ protected DynamicConfiguration(
) {
members.put(member.key(), member);
- configurator.addValidations((Class<? extends ConfigurationTree<?, ?>>)
getClass(), member.key(), validators);
+// configurator.addValidations((Class<? extends ConfigurationTree<?,
?>>) getClass(), member.key(), validators);
}
/** {@inheritDoc} */
- @Override public void change(CHANGE change) throws
ConfigurationValidationException {
- configurator.set(BaseSelectors.find(qualifiedName), change);
+ @Override public Future<Void> change(Consumer<CHANGE> change) throws
ConfigurationValidationException {
+ Objects.requireNonNull(change, "Configuration consumer cannot be
null.");
+
+ InnerNode rootNodeChange = ((RootKeyImpl)rootKey).createRootNode();
+
+ if (keys.size() == 1)
+ change.accept((CHANGE)rootNodeChange);
+ else {
+ // TODO Not optimal, can be improved. Do it when tests are ready.
+ fillFromPrefixMap(rootNodeChange,
toPrefixMap(Collections.singletonMap(join(keys), null)));
Review comment:
this code needs to be refactored for more clarity
----------------------------------------------------------------
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]