ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [28/50] [abbrv] incubator-ignite git commit: #ignite-683: Remove method removex(final K key, CacheEntryPredicate... filter) from GridCacheAdapter.
Date Tue, 14 Apr 2015 14:25:44 GMT
#ignite-683: Remove method  removex(final 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/db252df6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/db252df6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/db252df6

Branch: refs/heads/ignite-218
Commit: db252df6bb542519450ad06a5986345a0b17d609
Parents: 25a5f09
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Mon Apr 13 13:56:12 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Mon Apr 13 13:56:12 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheAdapter.java      | 26 +++-----------------
 .../dht/atomic/GridDhtAtomicCache.java          |  4 +--
 .../distributed/near/GridNearAtomicCache.java   |  4 +--
 .../local/atomic/GridLocalAtomicCache.java      |  4 +--
 4 files changed, 9 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/db252df6/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 ad68409..c0f6a62 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
@@ -2823,27 +2823,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
     }
 
     /** {@inheritDoc} */
-    @Override public boolean removex(final K key)
-        throws IgniteCheckedException {
-        boolean statsEnabled = ctx.config().isStatisticsEnabled();
-
-        long start = statsEnabled ? System.nanoTime() : 0L;
-
-        boolean rmv = removex(key, CU.empty0());
-
-        if (statsEnabled && rmv)
-            metrics0().addRemoveTimeNanos(System.nanoTime() - start);
-
-        return rmv;
-    }
-
-    /**
-     * @param key Key to remove.
-     * @param filter Optional filter.
-     * @return Previous value.
-     * @throws IgniteCheckedException If failed.
-     */
-     public boolean removex(final K key, @Nullable final CacheEntryPredicate... filter) throws
IgniteCheckedException {
+    @Override public boolean removex(final K key) throws IgniteCheckedException {
         boolean statsEnabled = ctx.config().isStatisticsEnabled();
 
         long start = statsEnabled ? System.nanoTime() : 0L;
@@ -2855,11 +2835,11 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
 
         boolean rmv = syncOp(new SyncOp<Boolean>(true) {
             @Override public Boolean op(IgniteTxLocalAdapter tx) throws IgniteCheckedException
{
-                return tx.removeAllAsync(ctx, Collections.singletonList(key), null, false,
filter).get().success();
+                return tx.removeAllAsync(ctx, Collections.singletonList(key), null, false,
CU.empty0()).get().success();
             }
 
             @Override public String toString() {
-                return "removex [key=" + key + ", filter=" + Arrays.toString(filter) + ']';
+                return "removex [key=" + key + ']';
             }
         });
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/db252df6/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 d665855..614770e 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
@@ -503,8 +503,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
     }
 
     /** {@inheritDoc} */
-    @Override public boolean removex(K key, @Nullable CacheEntryPredicate... filter) throws
IgniteCheckedException {
-        return removexAsync(key, filter).get();
+    @Override public boolean removex(K key) throws IgniteCheckedException {
+        return removexAsync(key, CU.empty0()).get();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/db252df6/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 b817470..ce19bb4 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
@@ -568,8 +568,8 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K,
V> {
     }
 
     /** {@inheritDoc} */
-    @Override public boolean removex(K key, @Nullable CacheEntryPredicate... filter) throws
IgniteCheckedException {
-        return dht.removex(key, filter);
+    @Override public boolean removex(K key) throws IgniteCheckedException {
+        return dht.removex(key);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/db252df6/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 c4735e3..fd0c4cf 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
@@ -326,7 +326,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
-    @Override public boolean removex(K key, @Nullable CacheEntryPredicate... filter) throws
IgniteCheckedException {
+    @Override public boolean removex(K key) throws IgniteCheckedException {
         boolean statsEnabled = ctx.config().isStatisticsEnabled();
 
         long start = statsEnabled ? System.nanoTime() : 0L;
@@ -340,7 +340,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             expiryPerCall(),
             false,
             false,
-            filter,
+            CU.empty0(),
             ctx.writeThrough());
 
         if (statsEnabled && rmv)


Mime
View raw message