#ignite-683: Rename remove0 to remove and removeAsync0 to removeAsync in 
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/bfed4b7b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/bfed4b7b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/bfed4b7b

Branch: refs/heads/ignite-218
Commit: bfed4b7b5084c9a90e2a3c1e0e95d2b74cae1e7e
Parents: a0a09f1
Author: ivasilinets <ivasilin...@gridgain.com>
Authored: Mon Apr 13 12:45:36 2015 +0300
Committer: ivasilinets <ivasilin...@gridgain.com>
Committed: Mon Apr 13 12:45:36 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheAdapter.java         | 17 ++++-------------
 .../processors/cache/GridCacheProjectionImpl.java  |  4 +---
 .../distributed/dht/atomic/GridDhtAtomicCache.java |  6 +++---
 .../distributed/near/GridNearAtomicCache.java      |  8 ++++----
 .../cache/local/atomic/GridLocalAtomicCache.java   |  4 ++--
 5 files changed, 14 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bfed4b7b/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 391ca3a..6605852 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
@@ -2728,7 +2728,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
     /** {@inheritDoc} */
     @Nullable @Override public V remove(K key)
         throws IgniteCheckedException {
-        return remove0(key, CU.empty0());
+        return remove(key, CU.empty0());
     }
 
     /**
@@ -2737,7 +2737,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
      * @return Previous value.
      * @throws IgniteCheckedException If failed.
      */
-    public V remove0(final K key, @Nullable final CacheEntryPredicate... 
filter) throws IgniteCheckedException {
+    public V remove(final K key, @Nullable final CacheEntryPredicate... 
filter) throws IgniteCheckedException {
         boolean statsEnabled = ctx.config().isStatisticsEnabled();
 
         long start = statsEnabled ? System.nanoTime() : 0L;
@@ -2770,16 +2770,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
 
     /** {@inheritDoc} */
     @Override public IgniteInternalFuture<V> removeAsync(K key) {
-        final boolean statsEnabled = ctx.config().isStatisticsEnabled();
-
-        final long start = statsEnabled ? System.nanoTime() : 0L;
-
-        IgniteInternalFuture<V> fut = removeAsync0(key, CU.empty0());
-
-        if (statsEnabled)
-            fut.listen(new UpdateRemoveTimeStatClosure<V>(metrics0(), start));
-
-        return fut;
+        return removeAsync(key, CU.empty0());
     }
 
     /**
@@ -2787,7 +2778,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
      * @param filter Optional filter.
      * @return Put operation future.
      */
-    public IgniteInternalFuture<V> removeAsync0(final K key, @Nullable final 
CacheEntryPredicate... filter) {
+    public IgniteInternalFuture<V> removeAsync(final K key, @Nullable final 
CacheEntryPredicate... filter) {
         final boolean statsEnabled = ctx.config().isStatisticsEnabled();
 
         final long start = statsEnabled ? System.nanoTime() : 0L;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bfed4b7b/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 a328d41..656e4a5 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
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.dr.*;
 import org.apache.ignite.internal.processors.cache.query.*;
@@ -36,7 +35,6 @@ import javax.cache.expiry.*;
 import javax.cache.processor.*;
 import java.io.*;
 import java.util.*;
-import java.util.concurrent.*;
 
 import static org.apache.ignite.cache.CacheMode.*;
 import static org.apache.ignite.internal.processors.cache.GridCacheUtils.*;
@@ -563,7 +561,7 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
 
     /** {@inheritDoc} */
     @Override public IgniteInternalFuture<V> removeAsync(K key) {
-        return cache.removeAsync0(key, CU.empty0());
+        return cache.removeAsync(key, CU.empty0());
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bfed4b7b/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 b60c2e5..6ffbaf8 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,13 +480,13 @@ public class GridDhtAtomicCache<K, V> extends 
GridDhtCacheAdapter<K, V> {
     }
 
     /** {@inheritDoc} */
-    @Override public V remove0(K key, @Nullable CacheEntryPredicate... filter) 
throws IgniteCheckedException {
-        return removeAsync0(key, filter).get();
+    @Override public V remove(K key, @Nullable CacheEntryPredicate... filter) 
throws IgniteCheckedException {
+        return removeAsync(key, filter).get();
     }
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
-    @Override public IgniteInternalFuture<V> removeAsync0(K key, @Nullable 
CacheEntryPredicate... filter) {
+    @Override public IgniteInternalFuture<V> removeAsync(K key, @Nullable 
CacheEntryPredicate... filter) {
         A.notNull(key, "key");
 
         return removeAllAsync0(Collections.singletonList(key), null, true, 
false, filter);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bfed4b7b/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 ef49708..a4b1d92 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,14 +547,14 @@ public class GridNearAtomicCache<K, V> extends 
GridNearCacheAdapter<K, V> {
     }
 
     /** {@inheritDoc} */
-    @Override public V remove0(K key, @Nullable CacheEntryPredicate... filter) 
throws IgniteCheckedException {
-        return dht.remove0(key, filter);
+    @Override public V remove(K key, @Nullable CacheEntryPredicate... filter) 
throws IgniteCheckedException {
+        return dht.remove(key, filter);
     }
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
-    @Override public IgniteInternalFuture<V> removeAsync0(K key, @Nullable 
CacheEntryPredicate... filter) {
-        return dht.removeAsync0(key, filter);
+    @Override public IgniteInternalFuture<V> removeAsync(K key, @Nullable 
CacheEntryPredicate... filter) {
+        return dht.removeAsync(key, filter);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bfed4b7b/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 faaa292..f9fb48d 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 remove0(K key, @Nullable CacheEntryPredicate... filter) 
throws IgniteCheckedException {
+    @Override public V remove(K key, @Nullable CacheEntryPredicate... filter) 
throws IgniteCheckedException {
         return (V)updateAllInternal(DELETE,
             Collections.singleton(key),
             null,
@@ -303,7 +303,7 @@ public class GridLocalAtomicCache<K, V> extends 
GridCacheAdapter<K, V> {
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
-    @Override public IgniteInternalFuture<V> removeAsync0(K key, @Nullable 
CacheEntryPredicate... filter) {
+    @Override public IgniteInternalFuture<V> removeAsync(K key, @Nullable 
CacheEntryPredicate... filter) {
         return removeAllAsync0(Collections.singletonList(key), true, false, 
filter);
     }
 

Reply via email to