tkalkirill commented on a change in pull request #366:
URL: https://github.com/apache/ignite-3/pull/366#discussion_r738391493
##########
File path:
modules/configuration/src/main/java/org/apache/ignite/internal/configuration/DynamicConfiguration.java
##########
@@ -142,8 +168,68 @@ public DynamicConfiguration(
}
/**
+ * Returns configuration interface.
+ *
* @return Configuration interface, for example {@code RootConfiguration}.
* @throws UnsupportedOperationException In the case of a named list.
*/
public abstract Class<? extends ConfigurationProperty<VIEW>> configType();
+
+ /**
+ * Returns specific configuration tree.
+ *
+ * @return Specific configuration tree.
+ */
+ public ConfigurationTree<VIEW, CHANGE> specificConfigTree() {
+ // To work with polymorphic configuration.
+ return this;
+ }
+
+ /**
+ * Removes members of the previous instance of polymorphic configuration.
+ *
+ * @param oldValue Old configuration value.
+ * @param members Configuration members (leaves and nodes).
+ */
+ protected void removeMembers(VIEW oldValue, Map<String,
ConfigurationProperty<?>> members) {
+ // No-op.
+ }
+
+ /**
+ * Adds members of the previous instance of polymorphic configuration.
+ *
+ * @param newValue New configuration value.
+ * @param members Configuration members (leaves and nodes).
+ */
+ protected void addMembers(VIEW newValue, Map<String,
ConfigurationProperty<?>> members) {
+ // No-op.
+ }
+
+ /**
+ * Add configuration member.
+ *
+ * @param members Configuration members (leaves and nodes).
+ * @param member Configuration member (leaf or node).
+ * @param <P> Type of member.
+ */
+ protected <P extends ConfigurationProperty<?>> void addMember(
+ Map<String, ConfigurationProperty<?>> members,
+ P member
+ ) {
+ members.put(member.key(), member);
+ }
+
+ /**
+ * Remove configuration member.
+ *
+ * @param members Configuration members (leaves and nodes).
+ * @param member Configuration member (leaf or node).
+ * @param <P> Type of member.
+ */
+ protected <P extends ConfigurationProperty<?>> void removeMember(
Review comment:
Use there **ConfigurationAsmGenerator#REMOVE_MEMBER_MTD**
--
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]