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/13 12:20:44 UTC
incubator-ignite git commit: #ignite-683: Remove method
removeAll(Collection extends K> keys,
CacheEntryPredicate... filter) and removeAllAsync(Collection extends K> keys,
CacheEntryPredicate... filter) from GridCacheAdapter.
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-683-2 aa1964f3f -> edb0e3fc3
#ignite-683: Remove method removeAll(Collection<? extends K> keys, CacheEntryPredicate... filter) and removeAllAsync(Collection<? extends K> keys, CacheEntryPredicate... filter) from GridCacheAdapter.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/edb0e3fc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/edb0e3fc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/edb0e3fc
Branch: refs/heads/ignite-683-2
Commit: edb0e3fc387f7bfec2c7bc4e1edc1c98fec9eaef
Parents: aa1964f
Author: ivasilinets <iv...@gridgain.com>
Authored: Mon Apr 13 13:20:36 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Mon Apr 13 13:20:36 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheAdapter.java | 28 +++-----------------
.../dht/atomic/GridDhtAtomicCache.java | 12 ++++-----
.../distributed/near/GridNearAtomicCache.java | 9 +++----
.../local/atomic/GridLocalAtomicCache.java | 10 +++----
4 files changed, 17 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/edb0e3fc/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 6782ab7..e16227a 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
@@ -2788,16 +2788,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
/** {@inheritDoc} */
@Override public void removeAll(final Collection<? extends K> keys) throws IgniteCheckedException {
- removeAll(keys, CU.empty0());
- }
-
- /**
- * @param keys Keys to remove.
- * @param filter Filter.
- * @throws IgniteCheckedException If failed.
- */
- public void removeAll(final Collection<? extends K> keys,
- final CacheEntryPredicate... filter) throws IgniteCheckedException {
boolean statsEnabled = ctx.config().isStatisticsEnabled();
long start = statsEnabled ? System.nanoTime() : 0L;
@@ -2812,11 +2802,11 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
syncOp(new SyncInOp(keys.size() == 1) {
@Override public void inOp(IgniteTxLocalAdapter tx) throws IgniteCheckedException {
- tx.removeAllAsync(ctx, keys, null, false, filter).get();
+ tx.removeAllAsync(ctx, keys, null, false, CU.empty0()).get();
}
@Override public String toString() {
- return "removeAll [keys=" + keys + ", filter=" + Arrays.toString(filter) + ']';
+ return "removeAll [keys=" + keys + ']';
}
});
@@ -2826,16 +2816,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
/** {@inheritDoc} */
@Override public IgniteInternalFuture<?> removeAllAsync(@Nullable final Collection<? extends K> keys) {
- return removeAllAsync(keys, CU.empty0());
- }
-
- /**
- * @param keys Keys to remove.
- * @param filter Filter.
- * @return Remove future.
- */
- public IgniteInternalFuture<?> removeAllAsync(@Nullable final Collection<? extends K> keys,
- final CacheEntryPredicate... filter) {
final boolean statsEnabled = ctx.config().isStatisticsEnabled();
final long start = statsEnabled ? System.nanoTime() : 0L;
@@ -2848,11 +2828,11 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
IgniteInternalFuture<Object> fut = asyncOp(new AsyncInOp(keys) {
@Override public IgniteInternalFuture<?> inOp(IgniteTxLocalAdapter tx) {
- return tx.removeAllAsync(ctx, keys, null, false, filter).chain(RET2NULL);
+ return tx.removeAllAsync(ctx, keys, null, false, CU.empty0()).chain(RET2NULL);
}
@Override public String toString() {
- return "removeAllAsync [keys=" + keys + ", filter=" + Arrays.toString(filter) + ']';
+ return "removeAllAsync [keys=" + keys + ']';
}
});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/edb0e3fc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 502a3d1..8e4e3cb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -493,17 +493,15 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public void removeAll(Collection<? extends K> keys,
- CacheEntryPredicate... filter) throws IgniteCheckedException {
- removeAllAsync(keys, filter).get();
+ @Override public void removeAll(Collection<? extends K> keys) throws IgniteCheckedException {
+ removeAllAsync(keys).get();
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<?> removeAllAsync(Collection<? extends K> keys,
- CacheEntryPredicate[] filter) {
+ @Override public IgniteInternalFuture<?> removeAllAsync(Collection<? extends K> keys) {
A.notNull(keys, "keys");
- return removeAllAsync0(keys, null, false, false, filter).chain(RET2NULL);
+ return removeAllAsync0(keys, null, false, false, CU.empty0()).chain(RET2NULL);
}
/** {@inheritDoc} */
@@ -533,7 +531,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
/** {@inheritDoc} */
@Override public IgniteInternalFuture<?> localRemoveAll(CacheEntryPredicate filter) {
- return removeAllAsync(keySet(filter), null);
+ return removeAllAsync(keySet(filter));
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/edb0e3fc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
index 4721ca3..c37acf1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
@@ -558,15 +558,14 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
}
/** {@inheritDoc} */
- @Override public void removeAll(Collection<? extends K> keys, CacheEntryPredicate... filter)
+ @Override public void removeAll(Collection<? extends K> keys)
throws IgniteCheckedException {
- dht.removeAll(keys, filter);
+ dht.removeAll(keys);
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<?> removeAllAsync(Collection<? extends K> keys,
- CacheEntryPredicate[] filter) {
- return dht.removeAllAsync(keys, filter);
+ @Override public IgniteInternalFuture<?> removeAllAsync(Collection<? extends K> keys) {
+ return dht.removeAllAsync(keys);
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/edb0e3fc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
index c57085d..1b6d683 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
@@ -309,8 +309,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public void removeAll(Collection<? extends K> keys,
- CacheEntryPredicate... filter) throws IgniteCheckedException {
+ @Override public void removeAll(Collection<? extends K> keys) throws IgniteCheckedException {
updateAllInternal(DELETE,
keys,
null,
@@ -318,14 +317,13 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> {
expiryPerCall(),
false,
false,
- filter,
+ CU.empty0(),
ctx.writeThrough());
}
/** {@inheritDoc} */
- @Override public IgniteInternalFuture<?> removeAllAsync(Collection<? extends K> keys,
- CacheEntryPredicate[] filter) {
- return removeAllAsync0(keys, false, false, filter).chain(RET2NULL);
+ @Override public IgniteInternalFuture<?> removeAllAsync(Collection<? extends K> keys) {
+ return removeAllAsync0(keys, false, false, CU.empty0()).chain(RET2NULL);
}
/** {@inheritDoc} */