ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-1.5 Should not wait on preloader sync future for system caches callbacks.
Date Tue, 01 Dec 2015 07:44:03 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1537 78962109e -> 1f08d2f7e


ignite-1.5 Should not wait on preloader sync future for system caches callbacks.


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

Branch: refs/heads/ignite-1537
Commit: 1f08d2f7e4ae335720a3ef9d02389c62be22b69f
Parents: 7896210
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Dec 1 10:43:58 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Dec 1 10:43:58 2015 +0300

----------------------------------------------------------------------
 .../CacheDefaultBinaryAffinityKeyMapper.java     | 19 +++++++++++++++----
 .../cache/GridCacheDefaultAffinityKeyMapper.java |  9 ++++++++-
 2 files changed, 23 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1f08d2f7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheDefaultBinaryAffinityKeyMapper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheDefaultBinaryAffinityKeyMapper.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheDefaultBinaryAffinityKeyMapper.java
index efd38f7..d244a16 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheDefaultBinaryAffinityKeyMapper.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheDefaultBinaryAffinityKeyMapper.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache;
 
+import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.internal.IgniteKernal;
 import org.apache.ignite.internal.processors.cache.portable.CacheObjectBinaryProcessorImpl;
@@ -30,12 +31,11 @@ public class CacheDefaultBinaryAffinityKeyMapper extends GridCacheDefaultAffinit
     /** */
     private static final long serialVersionUID = 0L;
 
+    /** */
+    private CacheObjectBinaryProcessorImpl proc;
+
     /** {@inheritDoc} */
     @Override public Object affinityKey(Object key) {
-        IgniteKernal kernal = (IgniteKernal)ignite;
-
-        CacheObjectBinaryProcessorImpl proc = (CacheObjectBinaryProcessorImpl)kernal.context().cacheObjects();
-
         try {
             key = proc.toPortable(key);
         }
@@ -48,4 +48,15 @@ public class CacheDefaultBinaryAffinityKeyMapper extends GridCacheDefaultAffinit
         else
             return super.affinityKey(key);
     }
+
+    /** {@inheritDoc} */
+    @Override public void ignite(Ignite ignite) {
+        super.ignite(ignite);
+
+        if (ignite != null) {
+            IgniteKernal kernal = (IgniteKernal)ignite;
+
+            proc = (CacheObjectBinaryProcessorImpl)kernal.context().cacheObjects();
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/1f08d2f7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDefaultAffinityKeyMapper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDefaultAffinityKeyMapper.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDefaultAffinityKeyMapper.java
index 6c5a8dc..5422bbd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDefaultAffinityKeyMapper.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDefaultAffinityKeyMapper.java
@@ -51,7 +51,6 @@ public class GridCacheDefaultAffinityKeyMapper implements AffinityKeyMapper
{
     private static final long serialVersionUID = 0L;
 
     /** Injected ignite instance. */
-    @IgniteInstanceResource
     protected transient Ignite ignite;
 
     /** Reflection cache. */
@@ -120,6 +119,14 @@ public class GridCacheDefaultAffinityKeyMapper implements AffinityKeyMapper
{
         return key;
     }
 
+    /**
+     * @param ignite Ignite.
+     */
+    @IgniteInstanceResource
+    public void ignite(Ignite ignite) {
+        this.ignite = ignite;
+    }
+
     /** {@inheritDoc} */
     @Override public void reset() {
         // No-op.


Mime
View raw message