Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-611 300a52824 -> b6955cfaf


#ignite-611: Add Javadoc.


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

Branch: refs/heads/ignite-611
Commit: b6955cfaffaa1819cc53662fd253c3470a7652a8
Parents: 300a528
Author: ivasilinets <ivasilin...@gridgain.com>
Authored: Fri Mar 27 12:00:08 2015 +0300
Committer: ivasilinets <ivasilin...@gridgain.com>
Committed: Fri Mar 27 12:00:08 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheAdapter.java      | 22 +++++++-
 .../cache/GridCacheProjectionImpl.java          | 58 --------------------
 2 files changed, 20 insertions(+), 60 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b6955cfa/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 8d3024b..f40f268 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
@@ -464,7 +464,16 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
             plc);
     }
 
-    /** {@inheritDoc} */
+    /**
+     * Gets cache projection only for given key and value type. Only {@code 
non-null} key-value
+     * pairs that have matching key and value pairs will be used in this 
projection.
+     *
+     * @param keyType Key type.
+     * @param valType Value type.
+     * @param <K1> Key type.
+     * @param <V1> Value type.
+     * @return Cache projection for given key and value types.
+     */
     @SuppressWarnings({"unchecked", "RedundantCast"})
     public <K1, V1> CacheProjection<K1, V1> projection(
         Class<? super K1> keyType,
@@ -490,7 +499,16 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
         return new GridCacheProxyImpl<>((GridCacheContext<K1, V1>)ctx, prj, 
prj);
     }
 
-    /** {@inheritDoc} */
+    /**
+     * Gets cache projection based on given entry filter. This filter will be 
simply passed through
+     * to all cache operations on this projection. Unlike 
<code>projection(org.apache.ignite.lang.IgniteBiPredicate)</code>
+     * method, this filter will <b>not</b> be used for pre-filtering.
+     *
+     * @param filter Filter to be passed through to all cache operations. If 
{@code null}, then the
+     *      same projection is returned.  If cache operation receives its own 
filter, then filters
+     *      will be {@code 'anded'}.
+     * @return Projection based on given filter.
+     */
     public CacheProjection<K, V> projection(CacheEntryPredicate filter) {
         if (filter == null)
             return this;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b6955cfa/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
index 6a1f8fe..1300fb6 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
@@ -278,64 +278,6 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
         return subjId;
     }
 
-    /** {@inheritDoc} */
-    @SuppressWarnings( {"unchecked", "RedundantCast"})
-    public <K1, V1> CacheProjection<K1, V1> projection(
-        Class<? super K1> keyType,
-        Class<? super V1> valType
-    ) {
-        A.notNull(keyType, "keyType", valType, "valType");
-
-        if (cctx.deploymentEnabled()) {
-            try {
-                cctx.deploy().registerClasses(keyType, valType);
-            }
-            catch (IgniteCheckedException e) {
-                throw new IgniteException(e);
-            }
-        }
-
-        GridCacheProjectionImpl<K1, V1> prj = new GridCacheProjectionImpl<>(
-            (CacheProjection<K1, V1>)this,
-            (GridCacheContext<K1, V1>)cctx,
-            CU.typeFilter0(keyType, valType),
-            flags,
-            subjId,
-            keepPortable,
-            expiryPlc);
-
-        return new GridCacheProxyImpl((GridCacheContext<K1, V1>)cctx, prj, 
prj);
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings({"unchecked"})
-    public CacheProjection<K, V> projection(CacheEntryPredicate filter) {
-        if (filter == null)
-            return new GridCacheProxyImpl<>(cctx, this, this);
-
-        if (this.filter != null)
-            filter = and(filter);
-
-        if (cctx.deploymentEnabled()) {
-            try {
-                cctx.deploy().registerClasses(filter);
-            }
-            catch (IgniteCheckedException e) {
-                throw new IgniteException(e);
-            }
-        }
-
-        GridCacheProjectionImpl<K, V> prj = new GridCacheProjectionImpl<>(this,
-            cctx,
-            filter,
-            flags,
-            subjId,
-            keepPortable,
-            expiryPlc);
-
-        return new GridCacheProxyImpl<>(cctx, prj, prj);
-    }
-
 
     /** {@inheritDoc} */
     @Override public CacheProjection<K, V> flagsOn(@Nullable CacheFlag[] 
flags) {

Reply via email to