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


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/IgniteDhtPartitionsToReloadMap.java:
##########
@@ -18,45 +18,46 @@
 
 package org.apache.ignite.internal.processors.cache.distributed.dht.preloader;
 
-import java.io.Serializable;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Map;
-import java.util.Set;
 import java.util.UUID;
+import org.apache.ignite.internal.Order;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.plugin.extensions.communication.Message;
 
 /**
  * Partition reload map.
  */
-public class IgniteDhtPartitionsToReloadMap implements Serializable {
-    /** */
-    private static final long serialVersionUID = 0L;
+public class IgniteDhtPartitionsToReloadMap implements Message {
+    /** Type code. */
+    public static final short TYPE_CODE = 508;
 
     /** */
-    private Map<UUID, Map<Integer, Set<Integer>>> map;
+    @Order(value = 0, method = "partitionsToReload")
+    private Map<UUID, CachePartitionsToReloadMap> map;
 
     /**
      * @param nodeId Node ID.
      * @param cacheId Cache ID.
      * @return Collection of partitions to reload.
      */
-    public synchronized Set<Integer> get(UUID nodeId, int cacheId) {
+    public synchronized Collection<Integer> get(UUID nodeId, int cacheId) {
         if (map == null)
             return Collections.emptySet();
 
-        Map<Integer, Set<Integer>> nodeMap = map.get(nodeId);
+        CachePartitionsToReloadMap nodeMap = map.get(nodeId);
 
         if (nodeMap == null)
             return Collections.emptySet();
 
-        Set<Integer> parts = nodeMap.get(cacheId);
+        PartitionsToReload partsToReload = nodeMap.get(cacheId);
 
-        if (parts == null)
+        if (partsToReload == null)
             return Collections.emptySet();
 
-        return parts;
+        return partsToReload.partitions();

Review Comment:
   Fixed



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