#ignite-683: Remove filter from GridCacheProjection.remove.

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

Branch: refs/heads/ignite-683
Commit: 23b52a61fee2ccb13ff52051adda96d46b7c3542
Parents: 9a94b13
Author: ivasilinets <ivasilin...@gridgain.com>
Authored: Tue Apr 7 00:09:11 2015 +0300
Committer: ivasilinets <ivasilin...@gridgain.com>
Committed: Tue Apr 7 00:09:11 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/cache/CacheProjection.java      | 6 +-----
 .../ignite/internal/processors/cache/GridCacheAdapter.java     | 4 ++--
 .../internal/processors/cache/GridCacheProjectionImpl.java     | 5 ++---
 .../ignite/internal/processors/cache/GridCacheProxyImpl.java   | 4 ++--
 .../cache/distributed/near/GridNearCacheAdapter.java           | 2 +-
 .../processors/datastructures/GridAtomicCacheQueueImpl.java    | 4 ++--
 .../datastructures/GridTransactionalCacheQueueImpl.java        | 2 +-
 .../processors/query/h2/GridH2IndexingGeoSelfTest.java         | 2 +-
 8 files changed, 12 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/23b52a61/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
index aa2da25..2ef345d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
@@ -1184,14 +1184,12 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * if there is one.
      *
      * @param key Key whose mapping is to be removed from cache.
-     * @param filter Optional filter to check prior to removing value form 
cache. Note
-     *      that filter is checked atomically together with remove operation.
      * @return Previous value associated with specified key, or {@code null}
      *      if there was no value for this key.
      * @throws NullPointerException If key is {@code null}.
      * @throws IgniteCheckedException If remove operation failed.
      */
-    @Nullable public V remove(K key, @Nullable CacheEntryPredicate... filter)
+    @Nullable public V remove(K key)
         throws IgniteCheckedException;
 
     /**
@@ -1233,8 +1231,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
      * if there is one.
      *
      * @param key Key whose mapping is to be removed from cache.
-     * @param filter Optional filter to check prior to removing value form 
cache. Note
-     *      that filter is checked atomically together with remove operation.
      * @return {@code True} if filter passed validation and entry was removed, 
{@code false} otherwise.
      *      Note that if filter is not specified, this method will return 
{@code true}.
      * @throws NullPointerException if the key is {@code null}.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/23b52a61/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 7d92aeb..015313a 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
@@ -2753,9 +2753,9 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public V remove(K key, CacheEntryPredicate[] filter)
+    @Nullable @Override public V remove(K key)
         throws IgniteCheckedException {
-        return remove(key, null, filter);
+        return remove(key, null, null);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/23b52a61/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 43a4724..42feced 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
@@ -667,9 +667,8 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
     }
 
     /** {@inheritDoc} */
-    @Override public V remove(K key,
-        @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
-        return removeAsync(key, filter).get();
+    @Override public V remove(K key) throws IgniteCheckedException {
+        return removeAsync(key, (CacheEntryPredicate[])null).get();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/23b52a61/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 542e40c..f33d4e0 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
@@ -1318,12 +1318,12 @@ public class GridCacheProxyImpl<K, V> implements 
GridCacheProxy<K, V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public V remove(K key, @Nullable CacheEntryPredicate[] 
filter)
+    @Nullable @Override public V remove(K key)
         throws IgniteCheckedException {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
         try {
-            return delegate.remove(key, filter);
+            return delegate.remove(key);
         }
         finally {
             gate.leave(prev);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/23b52a61/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
index 5986b15..e70a632 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
@@ -655,7 +655,7 @@ public abstract class GridNearCacheAdapter<K, V> extends 
GridDistributedCacheAda
             currIter.remove();
 
             try {
-                GridNearCacheAdapter.this.remove(currEntry.getKey(), 
CU.empty0());
+                GridNearCacheAdapter.this.remove(currEntry.getKey());
             }
             catch (IgniteCheckedException e) {
                 throw new IgniteException(e);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/23b52a61/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridAtomicCacheQueueImpl.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridAtomicCacheQueueImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridAtomicCacheQueueImpl.java
index 1027965..83f646c 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridAtomicCacheQueueImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridAtomicCacheQueueImpl.java
@@ -100,7 +100,7 @@ public class GridAtomicCacheQueueImpl<T> extends 
GridCacheQueueAdapter<T> {
 
                 while (true) {
                     try {
-                        T data = (T)cache.remove(key, null);
+                        T data = (T)cache.remove(key);
 
                         if (data != null)
                             return data;
@@ -109,7 +109,7 @@ public class GridAtomicCacheQueueImpl<T> extends 
GridCacheQueueAdapter<T> {
                             stop = U.currentTimeMillis() + RETRY_TIMEOUT;
 
                         while (U.currentTimeMillis() < stop ) {
-                            data = (T)cache.remove(key, null);
+                            data = (T)cache.remove(key);
 
                             if (data != null)
                                 return data;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/23b52a61/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridTransactionalCacheQueueImpl.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridTransactionalCacheQueueImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridTransactionalCacheQueueImpl.java
index 801e27f..c14011c 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridTransactionalCacheQueueImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridTransactionalCacheQueueImpl.java
@@ -108,7 +108,7 @@ public class GridTransactionalCacheQueueImpl<T> extends 
GridCacheQueueAdapter<T>
                     if (idx != null) {
                         checkRemoved(idx);
 
-                        retVal = (T)cache.remove(itemKey(idx), null);
+                        retVal = (T)cache.remove(itemKey(idx));
 
                         assert retVal != null : idx;
                     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/23b52a61/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
 
b/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
index 07abaf1..883bd20 100644
--- 
a/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
+++ 
b/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
@@ -100,7 +100,7 @@ public class GridH2IndexingGeoSelfTest extends 
GridCacheAbstractSelfTest {
         checkPoints(res, "B", "C", "D");
 
         // Remove B.
-        cache.remove(1, CU.empty0());
+        cache.remove(1);
 
         res = qry.execute(r.read("POLYGON((5 70, 5 80, 30 80, 30 70, 5 
70))")).get();
 

Reply via email to