Repository: ignite
Updated Branches:
  refs/heads/ignite-1093-2 d050b276b -> a5fc6f35b


1093


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a5fc6f35
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a5fc6f35
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a5fc6f35

Branch: refs/heads/ignite-1093-2
Commit: a5fc6f35b90288e738240b1c231a9c6e26b742c6
Parents: d050b27
Author: Anton Vinogradov <[email protected]>
Authored: Mon Sep 14 19:12:44 2015 +0300
Committer: Anton Vinogradov <[email protected]>
Committed: Mon Sep 14 19:12:44 2015 +0300

----------------------------------------------------------------------
 .../dht/preloader/GridDhtPartitionDemander.java | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a5fc6f35/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
index b03fa67..2e54294 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
@@ -276,7 +276,7 @@ public class GridDhtPartitionDemander {
             if (assigns.isEmpty()) {
                 fut.checkIsDone();
 
-                if (fut.assigns.topologyVersion().topologyVersion() > 1)// 
First node.
+                if (fut.assigns.topologyVersion().topologyVersion() > 1)// Not 
a First node.
                     U.log(log, "Rebalancing is not required [cache=" + 
cctx.name() +
                         ", topology=" + fut.assigns.topologyVersion() + "]");
 
@@ -774,19 +774,16 @@ public class GridDhtPartitionDemander {
         private final IgniteLogger log;
 
         /** Remaining. */
-        private ConcurrentHashMap8<UUID, Collection<Integer>> remaining = new 
ConcurrentHashMap8<>();
+        private final ConcurrentHashMap8<UUID, Collection<Integer>> remaining 
= new ConcurrentHashMap8<>();
 
         /** Missed. */
-        private ConcurrentHashMap8<UUID, Collection<Integer>> missed = new 
ConcurrentHashMap8<>();
+        private final ConcurrentHashMap8<UUID, Collection<Integer>> missed = 
new ConcurrentHashMap8<>();
 
-        /** Started. */
-        private ConcurrentHashMap8<UUID, Long> started = new 
ConcurrentHashMap8<>();
+        /** Started time. */
+        private final ConcurrentHashMap8<UUID, Long> started = new 
ConcurrentHashMap8<>();
 
         /** Lock. */
-        private Lock lock = new ReentrantLock();
-
-        /** Listener. */
-        private volatile GridLocalEventListener lsnr;
+        private final Lock lock = new ReentrantLock();
 
         /** Assignments. */
         private volatile GridDhtPreloaderAssignments assigns;
@@ -794,7 +791,7 @@ public class GridDhtPartitionDemander {
         /** Completed. */
         private volatile boolean completed = true;
 
-        private volatile boolean sendStopEvnt = false;
+        private final boolean sendStopEvnt;
 
         /**
          * @param assigns Assigns.
@@ -1021,9 +1018,6 @@ public class GridDhtPartitionDemander {
                 if (cctx.events().isRecordable(EVT_CACHE_REBALANCE_STOPPED) && 
(!cctx.isReplicated() || sendStopEvnt))
                     preloadEvent(EVT_CACHE_REBALANCE_STOPPED, 
assigns.exchangeFuture().discoveryEvent());
 
-                if (lsnr != null)
-                    cctx.events().removeListener(lsnr);
-
                 onDone(completed);
             }
         }

Reply via email to