IGNITE-19181 ConfigurationNotificationEvent API modified to include both old and new node/name values.#1883
Merged
ibessonov merged 6 commits intoapache:mainfrom Apr 3, 2023
Merged
Conversation
…oth old and new node/name values. Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
Signed-off-by: ibessonov <bessonov.ip@gmail.com>
tkalkirill
reviewed
Apr 3, 2023
| * @param viewClass Configuration interface, for example {@code RootView.class}. | ||
| * @param <T> Configuration type. | ||
| */ | ||
| @Nullable <T> T oldValue(Class<T> viewClass); |
Contributor
There was a problem hiding this comment.
In fact, oldValue() is a special case of this method, do you think it's worth getting rid of oldValue() ?
Contributor
Author
There was a problem hiding this comment.
We should leave the method without parameters, because unlike oldValue(FooView.class), oldValue() may return String / Integer / etc.
| * @param viewClass Configuration interface, for example {@code RootView.class}. | ||
| * @param <T> Configuration type. | ||
| */ | ||
| @Nullable <T> T newValue(Class<T> viewClass); |
...main/java/org/apache/ignite/internal/configuration/notifications/ConfigurationContainer.java
Outdated
Show resolved
Hide resolved
| */ | ||
| @Nullable ConfigurationProperty<InnerNode> specificConfig() { | ||
| return config.isRemovedFromNamedList() ? null : config.specificConfigTree(); | ||
| public @Nullable <T> T find(Class<T> clazz, boolean old) { |
Contributor
There was a problem hiding this comment.
Maybe different methods? findOld and findNew ?
Contributor
Author
There was a problem hiding this comment.
Why duplicating them? This one is good enough
Contributor
There was a problem hiding this comment.
Just a suggestion, it seems a little clearer to read code like this (findOld, findNew) instead of a parameter. But it's up to you.
| */ | ||
| Class<?> configClass() { | ||
| Class<?> polymorphicInstanceConfigType = config.polymorphicInstanceConfigType(); | ||
| public @Nullable String name(Class<?> clazz, boolean old) { |
tkalkirill
approved these changes
Apr 3, 2023
…/configuration/notifications/ConfigurationContainer.java Co-authored-by: Kirill Tkalenko <tkalkirill@yandex.ru>
lowka
pushed a commit
to gridgain/apache-ignite-3
that referenced
this pull request
Apr 19, 2023
…oth old and new node/name values. (apache#1883)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://issues.apache.org/jira/browse/IGNITE-19181