ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [5/8] incubator-ignite git commit: #ignite-758: Rename CacheProjection to InternalCache.
Date Thu, 16 Apr 2015 09:39:27 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/762d92cf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 38a9660..1c87750 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -71,7 +71,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.*;
  * Adapter for different cache implementations.
  */
 @SuppressWarnings("unchecked")
-public abstract class GridCacheAdapter<K, V> implements CacheProjection<K, V>,
Externalizable {
+public abstract class GridCacheAdapter<K, V> implements InternalCache<K, V>,
Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -366,8 +366,8 @@ public abstract class GridCacheAdapter<K, V> implements CacheProjection<K,
V>, E
 
     /** {@inheritDoc} */
     @SuppressWarnings({"unchecked", "RedundantCast"})
-    @Override public <K1, V1> CacheProjection<K1, V1> cache() {
-        return (CacheProjection<K1, V1>)this;
+    @Override public <K1, V1> InternalCache<K1, V1> cache() {
+        return (InternalCache<K1, V1>)this;
     }
 
     /** {@inheritDoc} */
@@ -3220,7 +3220,7 @@ public abstract class GridCacheAdapter<K, V> implements CacheProjection<K,
V>, E
 
             // Delegate to near if dht.
             if (e.isDht() && CU.isNearEnabled(ctx)) {
-                CacheProjection<K, V> near = ctx.isDht() ? ctx.dht().near() : ctx.near();
+                InternalCache<K, V> near = ctx.isDht() ? ctx.dht().near() : ctx.near();
 
                 return near.isLockedByThread(key) || e.lockedByThread();
             }
@@ -5055,7 +5055,7 @@ public abstract class GridCacheAdapter<K, V> implements CacheProjection<K,
V>, E
 
         /** {@inheritDoc} */
         @Override public Integer applyx(Object o) throws IgniteCheckedException {
-            CacheProjection<Object, Object> cache = ((IgniteEx)ignite).cachex(cacheName);
+            InternalCache<Object, Object> cache = ((IgniteEx)ignite).cachex(cacheName);
 
             assert cache != null : cacheName;
 
@@ -5092,7 +5092,7 @@ public abstract class GridCacheAdapter<K, V> implements CacheProjection<K,
V>, E
     }
 
     /**
-     * Internal callable which performs {@link CacheProjection#size()} or {@link CacheProjection#primarySize()}
+     * Internal callable which performs {@link InternalCache#size()} or {@link InternalCache#primarySize()}
      * operation on a cache with the given name.
      */
     @GridInternal
@@ -5128,7 +5128,7 @@ public abstract class GridCacheAdapter<K, V> implements CacheProjection<K,
V>, E
 
         /** {@inheritDoc} */
         @Override public Integer apply(Object o) {
-            CacheProjection<Object, Object> cache = ((IgniteEx)ignite).cachex(cacheName);
+            InternalCache<Object, Object> cache = ((IgniteEx)ignite).cachex(cacheName);
 
             return primaryOnly ? cache.primarySize() : cache.size();
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/762d92cf/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 8a51a54..d8c9517 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
@@ -2429,7 +2429,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @param <V> type of values.
      * @return Default cache.
      */
-    public <K, V> CacheProjection<K, V> cache() {
+    public <K, V> InternalCache<K, V> cache() {
         return cache(null);
     }
 
@@ -2440,7 +2440,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @return Cache instance for given name.
      */
     @SuppressWarnings("unchecked")
-    public <K, V> CacheProjection<K, V> cache(@Nullable String name) {
+    public <K, V> InternalCache<K, V> cache(@Nullable String name) {
         if (log.isDebugEnabled())
             log.debug("Getting cache for name: " + name);
 
@@ -2452,9 +2452,9 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     /**
      * @return All configured cache instances.
      */
-    public Collection<CacheProjection<?, ?>> caches() {
-        return F.viewReadOnly(jCacheProxies.values(), new IgniteClosure<IgniteCacheProxy<?,
?>, CacheProjection<?, ?>>() {
-            @Override public CacheProjection<?, ?> apply(IgniteCacheProxy<?, ?>
entries) {
+    public Collection<InternalCache<?, ?>> caches() {
+        return F.viewReadOnly(jCacheProxies.values(), new IgniteClosure<IgniteCacheProxy<?,
?>, InternalCache<?, ?>>() {
+            @Override public InternalCache<?, ?> apply(IgniteCacheProxy<?, ?>
entries) {
                 return entries.legacyProxy();
             }
         });
@@ -2488,7 +2488,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      *
      * @return Utility cache for atomic data structures.
      */
-    public <K, V> CacheProjection<K, V> atomicsCache() {
+    public <K, V> InternalCache<K, V> atomicsCache() {
         return cache(CU.ATOMICS_CACHE_NAME);
     }
 
@@ -2499,7 +2499,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @return Cache instance for given name.
      */
     @SuppressWarnings("unchecked")
-    public <K, V> CacheProjection<K, V> publicCache(@Nullable String name) {
+    public <K, V> InternalCache<K, V> publicCache(@Nullable String name) {
         if (log.isDebugEnabled())
             log.debug("Getting public cache for name: " + name);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/762d92cf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
index 4613be7..b5c5f0a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
@@ -43,7 +43,7 @@ import java.util.*;
 /**
  * Cache proxy.
  */
-public class GridCacheProxyImpl<K, V> implements CacheProjection<K, V>, Externalizable
{
+public class GridCacheProxyImpl<K, V> implements InternalCache<K, V>, Externalizable
{
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -59,7 +59,7 @@ public class GridCacheProxyImpl<K, V> implements CacheProjection<K,
V>, External
 
     /** Delegate object. */
     @GridToStringExclude
-    private CacheProjection<K, V> delegate;
+    private InternalCache<K, V> delegate;
 
     /** Projection. */
     @GridToStringExclude
@@ -83,7 +83,7 @@ public class GridCacheProxyImpl<K, V> implements CacheProjection<K,
V>, External
      * @param delegate Delegate object.
      * @param prj Optional projection which will be passed to gateway.
      */
-    public GridCacheProxyImpl(GridCacheContext<K, V> ctx, CacheProjection<K, V>
delegate,
+    public GridCacheProxyImpl(GridCacheContext<K, V> ctx, InternalCache<K, V>
delegate,
         @Nullable CacheProjectionContext prj) {
         assert ctx != null;
         assert delegate != null;
@@ -109,7 +109,7 @@ public class GridCacheProxyImpl<K, V> implements CacheProjection<K,
V>, External
     /**
      * @return Proxy delegate.
      */
-    public CacheProjection<K, V> delegate() {
+    public InternalCache<K, V> delegate() {
         return delegate;
     }
 
@@ -126,7 +126,7 @@ public class GridCacheProxyImpl<K, V> implements CacheProjection<K,
V>, External
     }
 
     /** {@inheritDoc} */
-    @Override public <K1, V1> CacheProjection<K1, V1> cache() {
+    @Override public <K1, V1> InternalCache<K1, V1> cache() {
         return cache.cache();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/762d92cf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index 209af3d..fb06eee 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -1159,7 +1159,7 @@ public class GridCacheUtils {
      * @param isolation Isolation.
      * @return New transaction.
      */
-    public static IgniteInternalTx txStartInternal(GridCacheContext ctx, CacheProjection
prj,
+    public static IgniteInternalTx txStartInternal(GridCacheContext ctx, InternalCache prj,
         TransactionConcurrency concurrency, TransactionIsolation isolation) {
         assert ctx != null;
         assert prj != null;
@@ -1595,8 +1595,8 @@ public class GridCacheUtils {
      * @param clo Closure.
      * @throws IgniteCheckedException If failed.
      */
-    public static <K, V> void inTx(CacheProjection<K, V> cache, TransactionConcurrency
concurrency,
-        TransactionIsolation isolation, IgniteInClosureX<CacheProjection<K ,V>>
clo) throws IgniteCheckedException {
+    public static <K, V> void inTx(InternalCache<K, V> cache, TransactionConcurrency
concurrency,
+        TransactionIsolation isolation, IgniteInClosureX<InternalCache<K ,V>>
clo) throws IgniteCheckedException {
 
         try (IgniteInternalTx tx = cache.txStartEx(concurrency, isolation);) {
             clo.applyx(cache);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/762d92cf/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 6efd5c7..006ba34 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
@@ -69,7 +69,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
 
     /** Delegate. */
     @GridToStringInclude
-    private CacheProjection<K, V> delegate;
+    private InternalCache<K, V> delegate;
 
     /** Projection. */
     private CacheProjectionContext prjCtx;
@@ -97,7 +97,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
      */
     public IgniteCacheProxy(
         GridCacheContext<K, V> ctx,
-        CacheProjection<K, V> delegate,
+        InternalCache<K, V> delegate,
         CacheProjectionContext prjCtx,
         boolean async
     ) {
@@ -1319,7 +1319,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
     /**
      *
      */
-    public CacheProjection delegate() {
+    public InternalCache delegate() {
         return delegate;
     }
 
@@ -1395,7 +1395,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
      * </ul> <p> For example, if you use {@link Integer} as a key and {@code
Value} class as a value (which will be
      * stored in portable format), you should acquire following projection to avoid deserialization:
      * <pre>
-     * CacheProjection<Integer, GridPortableObject> prj = cache.keepPortable();
+     * InternalCache<Integer, GridPortableObject> prj = cache.keepPortable();
      *
      * // Value is not deserialized and returned in portable format.
      * GridPortableObject po = prj.get(1);
@@ -1491,7 +1491,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
     @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
         ctx = (GridCacheContext<K, V>)in.readObject();
 
-        delegate = (CacheProjection<K, V>)in.readObject();
+        delegate = (InternalCache<K, V>)in.readObject();
 
         prjCtx = (CacheProjectionContext)in.readObject();
 


Mime
View raw message