ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/2] incubator-ignite git commit: #ignite-758: remove legacyProxy from IgniteCacheProxy.
Date Thu, 16 Apr 2015 21:24:25 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-758 6cf3da663 -> 5b1524bdb


#ignite-758: remove legacyProxy from 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/90533586
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/90533586
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/90533586

Branch: refs/heads/ignite-758
Commit: 905335866d651c2599a87c2c142a527b961153f3
Parents: 6cf3da6
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Fri Apr 17 00:20:35 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Fri Apr 17 00:20:35 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheProcessor.java        |  6 +++---
 .../internal/processors/cache/IgniteCacheProxy.java | 16 ----------------
 .../HibernateL2CacheConfigurationSelfTest.java      |  2 +-
 .../cache/hibernate/HibernateL2CacheSelfTest.java   |  2 +-
 4 files changed, 5 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90533586/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 7f33e85..f9ab6c6 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
@@ -2446,7 +2446,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
         IgniteCacheProxy<K, V> jcache = (IgniteCacheProxy<K, V>)jCacheProxies.get(maskNull(name));
 
-        return jcache == null ? null : jcache.legacyProxy();
+        return jcache == null ? null : jcache.delegate();
     }
 
     /**
@@ -2455,7 +2455,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.legacyProxy();
+                return entries.delegate();
             }
         });
     }
@@ -2516,7 +2516,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         if (jcache == null)
             throw new IllegalArgumentException("Cache is not started: " + name);
 
-        return jcache.legacyProxy();
+        return jcache.delegate();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90533586/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 9d1248b..7c3dac5 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,10 +76,6 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
 
     /** */
     @GridToStringExclude
-    private GridCacheProxyImpl<K, V> legacyProxy;
-
-    /** */
-    @GridToStringExclude
     private CacheManager cacheMgr;
 
     /**
@@ -111,8 +107,6 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
         this.prjCtx = prjCtx;
 
         gate = ctx.gate();
-
-        legacyProxy = new GridCacheProxyImpl<>(ctx, delegate, prjCtx);
     }
 
     /**
@@ -1338,8 +1332,6 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
             return (T)this;
         else if (clazz.isAssignableFrom(IgniteEx.class))
             return (T)ctx.grid();
-        else if (clazz.isAssignableFrom(legacyProxy.getClass()))
-            return (T)legacyProxy;
 
         throw new IllegalArgumentException("Unwrapping to class is not supported: " + clazz);
     }
@@ -1477,14 +1469,6 @@ 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);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90533586/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java
b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java
index 45769dc..6beb1b4 100644
--- a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java
+++ b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java
@@ -80,7 +80,7 @@ public class HibernateL2CacheConfigurationSelfTest extends GridCommonAbstractTes
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
         for (IgniteCacheProxy<?, ?> cache : ((IgniteKernal)grid(0)).caches())
-            cache.legacyProxy().clear();
+            cache.clear();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90533586/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
index 1c86d85..63cb3ac 100644
--- a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
+++ b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
@@ -1918,6 +1918,6 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest
{
         sesFactory2 = null;
 
         for (IgniteCacheProxy<?, ?> cache : ((IgniteKernal)grid(0)).caches())
-            cache.legacyProxy().clear();
+            cache.clear();
     }
 }


Mime
View raw message