You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/04/08 15:31:16 UTC
[13/15] incubator-ignite git commit: #ignite-683: Remove filters from
CacheProjection removeAsync.
#ignite-683: Remove filters from CacheProjection removeAsync.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b21e9ef8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b21e9ef8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b21e9ef8
Branch: refs/heads/ignite-683
Commit: b21e9ef85de04a86f36198efbcc48101b8681e93
Parents: 5c0d6c9
Author: ivasilinets <iv...@gridgain.com>
Authored: Wed Apr 8 01:01:10 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Wed Apr 8 01:01:10 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/processors/cache/CacheProjection.java | 4 +---
.../ignite/internal/processors/cache/GridCacheAdapter.java | 4 ++--
.../internal/processors/cache/GridCacheProjectionImpl.java | 6 +++---
.../ignite/internal/processors/cache/GridCacheProxyImpl.java | 4 ++--
4 files changed, 8 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b21e9ef8/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 1c3c5ff..d494cb2 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
@@ -1179,12 +1179,10 @@ 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 Future for the remove operation.
* @throws NullPointerException if the key is {@code null}.
*/
- public IgniteInternalFuture<V> removeAsync(K key, CacheEntryPredicate... filter);
+ public IgniteInternalFuture<V> removeAsync(K key);
/**
* Removes given key mapping from cache.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b21e9ef8/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 9a59f84..648f5c7 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
@@ -2915,12 +2915,12 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<V> removeAsync(K key, CacheEntryPredicate... filter) {
+ @Override public IgniteInternalFuture<V> removeAsync(K key) {
final boolean statsEnabled = ctx.config().isStatisticsEnabled();
final long start = statsEnabled ? System.nanoTime() : 0L;
- IgniteInternalFuture<V> fut = removeAsync(key, null, filter);
+ IgniteInternalFuture<V> fut = removeAsync(key, null, CU.empty0());
if (statsEnabled)
fut.listen(new UpdateRemoveTimeStatClosure<V>(metrics0(), start));
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b21e9ef8/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 d1e1f75..1fbaa92 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
@@ -657,7 +657,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
/** {@inheritDoc} */
@Override public V remove(K key) throws IgniteCheckedException {
- return removeAsync(key, (CacheEntryPredicate[])null).get();
+ return removeAsync(key).get();
}
/** {@inheritDoc} */
@@ -667,8 +667,8 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<V> removeAsync(K key, CacheEntryPredicate[] filter) {
- return removeAsync(key, null, filter);
+ @Override public IgniteInternalFuture<V> removeAsync(K key) {
+ return removeAsync(key, null, CU.empty0());
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b21e9ef8/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 ec96de9..739291f 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
@@ -1328,11 +1328,11 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<V> removeAsync(K key, CacheEntryPredicate[] filter) {
+ @Override public IgniteInternalFuture<V> removeAsync(K key) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
try {
- return delegate.removeAsync(key, filter);
+ return delegate.removeAsync(key);
}
finally {
gate.leave(prev);