ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [15/50] incubator-ignite git commit: #ignite-683: Remove unused methods promote.
Date Mon, 13 Apr 2015 17:40:03 GMT
#ignite-683: Remove unused methods promote.


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

Branch: refs/heads/ignite-sprint-4
Commit: 048ba0d38ab2bcd6f76d84b64ca7e6fa9877e924
Parents: 349bde7
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Thu Apr 9 18:55:08 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Thu Apr 9 18:55:08 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/CacheProjection.java       | 12 ---------
 .../internal/processors/cache/GridCache.java    |  1 -
 .../processors/cache/GridCacheAdapter.java      |  5 ----
 .../cache/GridCacheProjectionImpl.java          |  5 ----
 .../processors/cache/GridCacheProxyImpl.java    | 12 ---------
 .../distributed/near/GridNearCacheAdapter.java  |  6 -----
 .../cache/GridCacheAbstractFullApiSelfTest.java | 26 +++++++++++++++-----
 7 files changed, 20 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/048ba0d3/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 671a4a5..2fbb46f 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
@@ -1454,18 +1454,6 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
     public int globalPrimarySize() throws IgniteCheckedException;
 
     /**
-     * This method promotes cache entry by given key, if any, from offheap or swap storage
-     * into memory.
-     * <h2 class="header">Transactions</h2>
-     * This method is not transactional.
-     *
-     * @param key Key to promote entry for.
-     * @return Unswapped entry value or {@code null} for non-existing key.
-     * @throws IgniteCheckedException If promote failed.
-     */
-    @Nullable public V promote(K key) throws IgniteCheckedException;
-
-    /**
      * This method unswaps cache entries by given keys, if any, from swap storage
      * into memory.
      * <h2 class="header">Transactions</h2>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/048ba0d3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCache.java
index e5d356b..8af5fde 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCache.java
@@ -161,7 +161,6 @@ public interface GridCache<K, V> extends CacheProjection<K, V>
{
      *
      * @return Iterator over keys.
      * @throws IgniteCheckedException If failed.
-     * @see #promote(Object)
      */
     public Iterator<Map.Entry<K, V>> swapIterator() throws IgniteCheckedException;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/048ba0d3/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 edf14da..6f61fa9 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
@@ -3987,11 +3987,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
         });
     }
 
-    /** {@inheritDoc} */
-    @Nullable @Override public V promote(K key) throws IgniteCheckedException {
-        return promote(key, true);
-    }
-
     /**
      * @param key Key.
      * @param deserializePortable Deserialize portable flag.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/048ba0d3/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 1dd5c23..f3b38f9 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
@@ -721,11 +721,6 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K,
V
     }
 
     /** {@inheritDoc} */
-    @Override public V promote(K key) throws IgniteCheckedException {
-        return cache.promote(key, deserializePortables());
-    }
-
-    /** {@inheritDoc} */
     @Override public void promoteAll(@Nullable Collection<? extends K> keys) throws
IgniteCheckedException {
         cache.promoteAll(keys);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/048ba0d3/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 2c55deb..93090f0 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
@@ -1548,18 +1548,6 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K,
V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public V promote(K key) throws IgniteCheckedException {
-        GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
-        try {
-            return delegate.promote(key);
-        }
-        finally {
-            gate.leave(prev);
-        }
-    }
-
-    /** {@inheritDoc} */
     @Override public void promoteAll(@Nullable Collection<? extends K> keys) throws
IgniteCheckedException {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/048ba0d3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
index 3ee3a77..6e72f06 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
@@ -441,12 +441,6 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
     }
 
     /** {@inheritDoc} */
-    @Override public V promote(K key) throws IgniteCheckedException {
-        // Unswap only from dht(). Near cache does not have swap storage.
-        return dht().promote(key);
-    }
-
-    /** {@inheritDoc} */
     @Override public void promoteAll(@Nullable Collection<? extends K> keys) throws
IgniteCheckedException {
         // Unswap only from dht(). Near cache does not have swap storage.
         // In near-only cache this is a no-op.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/048ba0d3/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index 1238565..b1dd3ab 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -3453,20 +3453,34 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         int cnt = 0;
 
         if (locKeys.contains(k2)) {
-            assertEquals((Integer)2, cache.promote(k2));
+            assertNull(cache.localPeek(k2, ONHEAP_PEEK_MODES, null));
+
+            cache.promoteAll(Collections.singleton(k2));
+
+            assertEquals((Integer) 2, cache.localPeek(k2, ONHEAP_PEEK_MODES, null));
 
             cnt++;
         }
-        else
-            assertNull(cache.promote(k2));
+        else {
+            cache.promoteAll(Collections.singleton(k2));
+
+            assertNull(cache.localPeek(k2, ONHEAP_PEEK_MODES, null));
+        }
 
         if (locKeys.contains(k3)) {
-            assertEquals((Integer)3, cache.promote(k3));
+            assertNull(cache.localPeek(k3, ONHEAP_PEEK_MODES, null));
+
+            cache.promoteAll(Collections.singleton(k3));
+
+            assertEquals((Integer)3, cache.localPeek(k3, ONHEAP_PEEK_MODES, null));
 
             cnt++;
         }
-        else
-            assertNull(cache.promote(k3));
+        else {
+            cache.promoteAll(Collections.singleton(k3));
+
+            assertNull(cache.localPeek(k3, ONHEAP_PEEK_MODES, null));
+        }
 
         assertEquals(cnt, swapEvts.get());
         assertEquals(cnt, unswapEvts.get());


Mime
View raw message