ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [13/43] incubator-ignite git commit: Ignite-86 review
Date Mon, 02 Feb 2015 14:17:05 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/cb767aaa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/cb767aaa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/cb767aaa

Branch: refs/heads/ignite-26
Commit: cb767aaadc36d1efbeff5605f85c6668128c3b70
Parents: 7cccef7
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Fri Jan 23 20:08:36 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Fri Jan 23 20:08:36 2015 +0300

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


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb767aaa/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 2f007f2..2df866d 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
@@ -53,12 +53,10 @@ public class GridCacheDeploymentManager<K, V> extends GridCacheSharedManagerAdap
     private volatile ClassLoader globalLdr;
 
     /** Undeploys. */
-    private final ConcurrentHashMap8<GridCacheContext, ConcurrentLinkedQueue<CA>>
undeploys
-        = new ConcurrentHashMap8<>();
+    private final ConcurrentMap<String, ConcurrentLinkedQueue<CA>> undeploys
= new ConcurrentHashMap8<>();
 
     /** Per-thread deployment context. */
-    private ConcurrentMap<IgniteUuid, CachedDeploymentInfo<K, V>> deps =
-        new ConcurrentHashMap8<>();
+    private ConcurrentMap<IgniteUuid, CachedDeploymentInfo<K, V>> deps = new
ConcurrentHashMap8<>();
 
     /** Collection of all known participants (Node ID -> Loader ID). */
     private Map<UUID, IgniteUuid> allParticipants = new ConcurrentHashMap8<>();
@@ -184,10 +182,12 @@ public class GridCacheDeploymentManager<K, V> extends GridCacheSharedManagerAdap
     public void unwind(GridCacheContext ctx) {
         int cnt = 0;
 
-        if (undeploys.get(ctx) == null)
+        ConcurrentLinkedQueue<CA> q = undeploys.get(ctx);
+
+        if (q == null)
             return;
 
-        for (CA c = undeploys.get(ctx).poll(); c != null; c = undeploys.get(ctx).poll())
{
+        for (CA c = q.poll(); c != null; c = q.poll()) {
             c.apply();
 
             cnt++;
@@ -209,7 +209,7 @@ public class GridCacheDeploymentManager<K, V> extends GridCacheSharedManagerAdap
             log.debug("Received onUndeploy() request [ldr=" + ldr + ", cctx=" + cctx + ']');
 
         for (final GridCacheContext<K, V> cacheCtx : cctx.cacheContexts()) {
-            undeploys.putIfAbsent(cacheCtx, new ConcurrentLinkedQueue<CA>());
+            undeploys.putIfAbsent(cacheCtx.namexx(), new ConcurrentLinkedQueue<CA>());
// TODO
 
             undeploys.get(cacheCtx).add(new CA() {
                 @Override


Mime
View raw message