AMashenkov commented on a change in pull request #336:
URL: https://github.com/apache/ignite-3/pull/336#discussion_r714593956
##########
File path:
modules/configuration/src/main/java/org/apache/ignite/internal/configuration/ConfigurationNode.java
##########
@@ -17,24 +17,27 @@
package org.apache.ignite.internal.configuration;
-import java.util.Collections;
+import java.util.Collection;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Objects;
-import java.util.concurrent.CopyOnWriteArrayList;
+import org.apache.ignite.configuration.ConfigurationListenOnlyException;
import org.apache.ignite.configuration.ConfigurationProperty;
import org.apache.ignite.configuration.RootKey;
import org.apache.ignite.configuration.notifications.ConfigurationListener;
import org.apache.ignite.internal.configuration.tree.TraversableTreeNode;
import org.apache.ignite.internal.configuration.util.ConfigurationUtil;
import org.apache.ignite.internal.configuration.util.KeyNotFoundException;
+import static java.util.Collections.unmodifiableCollection;
+import static java.util.concurrent.ConcurrentHashMap.newKeySet;
+
/**
* Super class for dynamic configuration tree nodes. Has all common data and
value retrieving algorithm in it.
*/
public abstract class ConfigurationNode<VIEW, CHANGE> implements
ConfigurationProperty<VIEW, CHANGE> {
/** Listeners of property update. */
- protected final List<ConfigurationListener<VIEW>> updateListeners = new
CopyOnWriteArrayList<>();
+ protected final Collection<ConfigurationListener<VIEW>> updateListeners =
newKeySet();
Review comment:
```suggestion
protected final Collection<ConfigurationListener<VIEW>> updateListeners
= ConcurrentHashMap.newKeySet();
```
--
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]