ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [20/42] incubator-ignite git commit: ignite-86 review
Date Mon, 02 Feb 2015 15:01:00 GMT
ignite-86 review


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

Branch: refs/heads/ignite-140
Commit: 0349c858bd60202880a8e5d6631eac9d62d7e5dc
Parents: ff5c7a4
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Tue Jan 27 16:10:43 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Tue Jan 27 16:10:43 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheDeploymentManager.java  | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0349c858/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
index fa0f65f..2253d88 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
@@ -185,7 +185,7 @@ public class GridCacheDeploymentManager<K, V> extends GridCacheSharedManagerAdap
         List<CA> q;
 
         synchronized (undeploys) {
-            q = undeploys.remove(ctx.namexx());
+            q = undeploys.remove(ctx.name());
         }
 
         if (q == null)
@@ -212,14 +212,12 @@ public class GridCacheDeploymentManager<K, V> extends GridCacheSharedManagerAdap
         if (log.isDebugEnabled())
             log.debug("Received onUndeploy() request [ldr=" + ldr + ", cctx=" + cctx + ']');
 
-        for (final GridCacheContext<K, V> cacheCtx : cctx.cacheContexts()) {
-            synchronized (undeploys) {
-                List<CA> queue = new ArrayList<>();
+        synchronized (undeploys) {
+            for (final GridCacheContext<K, V> cacheCtx : cctx.cacheContexts()) {
+                List<CA> queue = undeploys.get(cacheCtx.name());
 
-                if (undeploys.containsKey(cacheCtx.namexx()))
-                    queue = undeploys.get(cacheCtx.namexx());
-                else
-                    undeploys.put(cacheCtx.namexx(), queue);
+                if (queue == null)
+                    undeploys.put(cacheCtx.name(), queue = new ArrayList<>());
 
                 queue.add(new CA() {
                     @Override


Mime
View raw message