ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [49/50] incubator-ignite git commit: #ignite-683: Revert renaming replace methods in GridCacheProjectionEx.
Date Mon, 13 Apr 2015 17:40:37 GMT
#ignite-683: Revert renaming replace methods in GridCacheProjectionEx.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f9e922ae
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f9e922ae
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f9e922ae

Branch: refs/heads/ignite-sprint-4
Commit: f9e922ae12a88f97602ba7b90f71dbde47ff4283
Parents: b3d371c
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Mon Apr 13 15:04:19 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Mon Apr 13 15:04:19 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 | 8 ++++----
 .../ignite/internal/processors/cache/IgniteCacheProxy.java   | 4 ++--
 .../cache/distributed/dht/atomic/GridDhtAtomicCache.java     | 6 +++---
 .../cache/distributed/near/GridNearAtomicCache.java          | 8 ++++----
 .../processors/cache/local/atomic/GridLocalAtomicCache.java  | 4 ++--
 .../ignite/internal/processors/igfs/IgfsMetaManager.java     | 2 +-
 .../rest/handlers/cache/GridCacheCommandHandler.java         | 2 +-
 .../java/org/apache/ignite/startup/BasicWarmupClosure.java   | 2 +-
 11 files changed, 25 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f9e922ae/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 c082114..87af7fa 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
@@ -706,7 +706,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * @throws NullPointerException If either key or value are {@code null}.
      * @throws IgniteCheckedException If replace operation failed.
      */
-    public boolean getAndReplace(K key, V oldVal, V newVal) throws IgniteCheckedException;
+    public boolean replace(K key, V oldVal, V newVal) throws IgniteCheckedException;
 
     /**
      * Asynchronously stores given key-value pair in cache only if only if the previous value
is equal to the
@@ -726,7 +726,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * @return Future for the replace operation.
      * @throws NullPointerException If either key or value are {@code null}.
      */
-    public IgniteInternalFuture<Boolean> getAndReplaceAsync(K key, V oldVal, V newVal);
+    public IgniteInternalFuture<Boolean> replaceAsync(K key, V oldVal, V newVal);
 
     /**
      * Stores given key-value pairs in cache. If filters are provided, then entries will

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f9e922ae/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 0a11f50..acccd53 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
@@ -2579,7 +2579,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
     }
 
     /** {@inheritDoc} */
-    @Override public boolean getAndReplace(final K key, final V oldVal, final V newVal) throws
IgniteCheckedException {
+    @Override public boolean replace(final K key, final V oldVal, final V newVal) throws
IgniteCheckedException {
         A.notNull(key, "key", oldVal, "oldVal", newVal, "newVal");
 
         if (keyCheck)
@@ -2606,7 +2606,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteInternalFuture<Boolean> getAndReplaceAsync(final K key,
final V oldVal, final V newVal) {
+    @Override public IgniteInternalFuture<Boolean> replaceAsync(final K key, final
V oldVal, final V newVal) {
         final boolean statsEnabled = ctx.config().isStatisticsEnabled();
 
         final long start = statsEnabled ? System.nanoTime() : 0L;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f9e922ae/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 b3f5562..7358aed 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
@@ -423,12 +423,12 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K,
V
     }
 
     /** {@inheritDoc} */
-    @Override public boolean getAndReplace(K key, V oldVal, V newVal) throws IgniteCheckedException
{
-        return getAndReplaceAsync(key, oldVal, newVal).get();
+    @Override public boolean replace(K key, V oldVal, V newVal) throws IgniteCheckedException
{
+        return replaceAsync(key, oldVal, newVal).get();
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteInternalFuture<Boolean> getAndReplaceAsync(K key, V oldVal,
V newVal) {
+    @Override public IgniteInternalFuture<Boolean> replaceAsync(K key, V oldVal, V
newVal) {
         CacheEntryPredicate fltr = cctx.equalsValue(oldVal);
 
         return cache.putAsync(key, newVal, fltr);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f9e922ae/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 f388d98..334503f 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
@@ -753,11 +753,11 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K,
V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Override public boolean getAndReplace(K key, V oldVal, V newVal) throws IgniteCheckedException
{
+    @Override public boolean replace(K key, V oldVal, V newVal) throws IgniteCheckedException
{
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
         try {
-            return delegate.getAndReplace(key, oldVal, newVal);
+            return delegate.replace(key, oldVal, newVal);
         }
         finally {
             gate.leave(prev);
@@ -765,11 +765,11 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K,
V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteInternalFuture<Boolean> getAndReplaceAsync(K key, V oldVal,
V newVal) {
+    @Override public IgniteInternalFuture<Boolean> replaceAsync(K key, V oldVal, V
newVal) {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
         try {
-            return delegate.getAndReplaceAsync(key, oldVal, newVal);
+            return delegate.replaceAsync(key, oldVal, newVal);
         }
         finally {
             gate.leave(prev);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f9e922ae/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index 06564d7..44a5dbe 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -931,12 +931,12 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
 
             try {
                 if (isAsync()) {
-                    setFuture(delegate.getAndReplaceAsync(key, oldVal, newVal));
+                    setFuture(delegate.replaceAsync(key, oldVal, newVal));
 
                     return false;
                 }
                 else
-                    return delegate.getAndReplace(key, oldVal, newVal);
+                    return delegate.replace(key, oldVal, newVal);
             }
             finally {
                 gate.leave(prev);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f9e922ae/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 786900e..8c5e1a9 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
@@ -395,12 +395,12 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
     }
 
     /** {@inheritDoc} */
-    @Override public boolean getAndReplace(K key, V oldVal, V newVal) throws IgniteCheckedException
{
-        return getAndReplaceAsync(key, oldVal, newVal).get();
+    @Override public boolean replace(K key, V oldVal, V newVal) throws IgniteCheckedException
{
+        return replaceAsync(key, oldVal, newVal).get();
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteInternalFuture<Boolean> getAndReplaceAsync(K key, V oldVal,
V newVal) {
+    @Override public IgniteInternalFuture<Boolean> replaceAsync(K key, V oldVal, V
newVal) {
         A.notNull(key, "key", oldVal, "oldVal", newVal, "newVal");
 
         return putAsync(key, newVal, ctx.equalsValArray(oldVal));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f9e922ae/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 9356af1..a80a42b 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
@@ -450,13 +450,13 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K,
V> {
     }
 
     /** {@inheritDoc} */
-    @Override public boolean getAndReplace(K key, V oldVal, V newVal) throws IgniteCheckedException
{
-        return dht.getAndReplace(key, oldVal, newVal);
+    @Override public boolean replace(K key, V oldVal, V newVal) throws IgniteCheckedException
{
+        return dht.replace(key, oldVal, newVal);
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteInternalFuture<Boolean> getAndReplaceAsync(K key, V oldVal,
V newVal) {
-        return dht.getAndReplaceAsync(key, oldVal, newVal);
+    @Override public IgniteInternalFuture<Boolean> replaceAsync(K key, V oldVal, V
newVal) {
+        return dht.replaceAsync(key, oldVal, newVal);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f9e922ae/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 bdbdb27..6938a38 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
@@ -198,14 +198,14 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
     }
 
     /** {@inheritDoc} */
-    @Override public boolean getAndReplace(K key, V oldVal, V newVal) throws IgniteCheckedException
{
+    @Override public boolean replace(K key, V oldVal, V newVal) throws IgniteCheckedException
{
         A.notNull(oldVal, "oldVal");
 
         return put(key, newVal, ctx.equalsValArray(oldVal));
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteInternalFuture<Boolean> getAndReplaceAsync(K key, V oldVal,
V newVal) {
+    @Override public IgniteInternalFuture<Boolean> replaceAsync(K key, V oldVal, V
newVal) {
         return putAsync(key, newVal, ctx.equalsValArray(oldVal));
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f9e922ae/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
index 4765594..2443c6e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
@@ -1491,7 +1491,7 @@ public class IgfsMetaManager extends IgfsManager {
                         throw fsException("Failed to update file info (file types differ)"
+
                             " [oldInfo=" + oldInfo + ", newInfo=" + newInfo + ", c=" + c
+ ']');
 
-                    boolean b = metaCache.getAndReplace(fileId, oldInfo, newInfo);
+                    boolean b = metaCache.replace(fileId, oldInfo, newInfo);
 
                     assert b : "Inconsistent transaction state [oldInfo=" + oldInfo + ",
newInfo=" + newInfo +
                         ", c=" + c + ']';

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f9e922ae/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
index 697c92b..877f096 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
@@ -837,7 +837,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter
{
             return exp == null && val == null ? c.removeAsync(key) :
                 exp == null ? c.putIfAbsentAsync(key, val) :
                     val == null ? c.removeAsync(key, exp) :
-                        c.getAndReplaceAsync(key, exp, val);
+                        c.replaceAsync(key, exp, val);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f9e922ae/modules/core/src/main/java/org/apache/ignite/startup/BasicWarmupClosure.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/startup/BasicWarmupClosure.java
b/modules/core/src/main/java/org/apache/ignite/startup/BasicWarmupClosure.java
index 3d2f0ad..7d85bbd 100644
--- a/modules/core/src/main/java/org/apache/ignite/startup/BasicWarmupClosure.java
+++ b/modules/core/src/main/java/org/apache/ignite/startup/BasicWarmupClosure.java
@@ -553,7 +553,7 @@ public class BasicWarmupClosure implements IgniteInClosure<IgniteConfiguration>
 
         /** {@inheritDoc} */
         @Override protected void operation(int key) throws Exception {
-            cache.getAndReplace(key, key, key);
+            cache.replace(key, key, key);
         }
     }
 }


Mime
View raw message