wernerdv commented on code in PR #12508:
URL: https://github.com/apache/ignite/pull/12508#discussion_r2532144975


##########
modules/core/src/main/java/org/apache/ignite/internal/util/GridPartitionStateMap.java:
##########
@@ -22,19 +22,27 @@
 import java.util.AbstractSet;
 import java.util.BitSet;
 import java.util.Iterator;
+import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.Set;
+import org.apache.ignite.internal.Order;
+import 
org.apache.ignite.internal.managers.communication.GridDhtPartitionStateMessage;
 import 
org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.plugin.extensions.communication.Message;
 
 /**
  * Grid partition state map. States are encoded using bits.
  * <p>
  * Null values are prohibited.
  */
-public class GridPartitionStateMap extends AbstractMap<Integer, 
GridDhtPartitionState> implements Serializable {
+public class GridPartitionStateMap extends AbstractMap<Integer, 
GridDhtPartitionState> implements Serializable, Message {

Review Comment:
   Implementation of Serializable is required because GridPartitionStateMap is 
used inside GridDhtPartitionMap.
   See details 
https://github.com/apache/ignite/pull/12508#discussion_r2532139935
   
   Regarding extending AbstractMap - this allows us to utilize the default 
implementations of methods like isEmpty, keySet, and values, as well as use 
utility methods designed for maps (such as `F.isEmpty` and 
`GridCacheProcessor#filteredMap`).
   
   Therefore, I propose keeping inheritance from AbstractMap. What do you think?



-- 
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]

Reply via email to