#ignite-683: Remove method remove(K key, 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/4229801a Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4229801a Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4229801a Branch: refs/heads/ignite-218 Commit: 4229801a723bd0b6c7d792b7dcb4539a73eedade Parents: e7e6595 Author: ivasilinets <ivasilin...@gridgain.com> Authored: Mon Apr 13 13:08:39 2015 +0300 Committer: ivasilinets <ivasilin...@gridgain.com> Committed: Mon Apr 13 13:08:39 2015 +0300 ---------------------------------------------------------------------- .../processors/cache/GridCacheAdapter.java | 17 +++-------------- .../distributed/dht/atomic/GridDhtAtomicCache.java | 4 ++-- .../distributed/near/GridNearAtomicCache.java | 4 ++-- .../cache/local/atomic/GridLocalAtomicCache.java | 4 ++-- 4 files changed, 9 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4229801a/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 de91bc6..5efd0f8 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 @@ -2726,18 +2726,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Nullable @Override public V remove(K key) - throws IgniteCheckedException { - return remove(key, CU.empty0()); - } - - /** - * @param key Key to remove. - * @param filter Optional filter. - * @return Previous value. - * @throws IgniteCheckedException If failed. - */ - public V remove(final K key, @Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException { + @Nullable @Override public V remove(final K key) throws IgniteCheckedException { boolean statsEnabled = ctx.config().isStatisticsEnabled(); long start = statsEnabled ? System.nanoTime() : 0L; @@ -2749,7 +2738,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, V prevVal = syncOp(new SyncOp<V>(true) { @Override public V op(IgniteTxLocalAdapter tx) throws IgniteCheckedException { - V ret = tx.removeAllAsync(ctx, Collections.singletonList(key), null, true, filter).get().value(); + V ret = tx.removeAllAsync(ctx, Collections.singletonList(key), null, true, CU.empty0()).get().value(); if (ctx.config().getInterceptor() != null) return (V)ctx.config().getInterceptor().onBeforeRemove(new CacheEntryImpl(key, ret)).get2(); @@ -2758,7 +2747,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } @Override public String toString() { - return "remove [key=" + key + ", filter=" + Arrays.toString(filter) + ']'; + return "remove [key=" + key + ']'; } }); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4229801a/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 8f3d0f7..09b724e 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 @@ -480,8 +480,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<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, CU.empty0()).get(); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4229801a/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 b98a246..692f712 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 @@ -547,8 +547,8 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public V remove(K key, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException { - return dht.remove(key, filter); + @Override public V remove(K key) throws IgniteCheckedException { + return dht.remove(key); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4229801a/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 4b3a875..7dcb3b1 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 @@ -289,7 +289,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public V remove(K key, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException { + @Override public V remove(K key) throws IgniteCheckedException { return (V)updateAllInternal(DELETE, Collections.singleton(key), null, @@ -297,7 +297,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { expiryPerCall(), true, false, - filter, + CU.empty0(), ctx.writeThrough()); }