ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [35/50] [abbrv] incubator-ignite git commit: #ignite-758: Revert legacy proxy in IgniteCacheProxy.
Date Mon, 20 Apr 2015 11:48:46 GMT
#ignite-758: Revert legacy proxy in IgniteCacheProxy.


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

Branch: refs/heads/ignite-sprint-4
Commit: d50b6f07456fa5397d7963ac8c5262adb5fb4e0e
Parents: c69401a
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Fri Apr 17 13:02:34 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Fri Apr 17 13:02:34 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/GridCacheProcessor.java  |  4 ++--
 .../internal/processors/cache/IgniteCacheProxy.java    | 13 +++++++++++++
 2 files changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d50b6f07/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 36695a0..fda420d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -2444,7 +2444,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
         IgniteCacheProxy<K, V> jcache = (IgniteCacheProxy<K, V>)jCacheProxies.get(maskNull(name));
 
-        return jcache == null ? null : jcache.delegate();
+        return jcache == null ? null : jcache.legacyProxy();
     }
 
     /**
@@ -2453,7 +2453,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     public Collection<IgniteInternalCache<?, ?>> caches() {
         return F.viewReadOnly(jCacheProxies.values(), new IgniteClosure<IgniteCacheProxy<?,
?>, IgniteInternalCache<?, ?>>() {
             @Override public IgniteInternalCache<?, ?> apply(IgniteCacheProxy<?,
?> entries) {
-                return entries.delegate();
+                return entries.legacyProxy();
             }
         });
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d50b6f07/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index 9c30c67..3b28de7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -76,6 +76,10 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
 
     /** */
     @GridToStringExclude
+    private GridCacheProxyImpl<K, V> legacyProxy;
+
+    /** */
+    @GridToStringExclude
     private CacheManager cacheMgr;
 
     /**
@@ -107,6 +111,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
         this.prjCtx = prjCtx == null ? new CacheOperationContext() : prjCtx;
 
         gate = ctx.gate();
+        legacyProxy = new GridCacheProxyImpl<>(ctx, delegate, prjCtx);
     }
 
     /**
@@ -1463,6 +1468,14 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
         curFut.set(new IgniteFutureImpl<>(fut));
     }
 
+    /**
+     * @return Legacy proxy.
+     */
+    @NotNull
+    public GridCacheProxyImpl<K, V> legacyProxy() {
+        return legacyProxy;
+    }
+
     /** {@inheritDoc} */
     @Override public void writeExternal(ObjectOutput out) throws IOException {
         out.writeObject(ctx);


Mime
View raw message