ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [15/30] incubator-ignite git commit: #ignite-333: Remove method IgniteCache.localClear().
Date Fri, 13 Mar 2015 17:06:40 GMT
#ignite-333: Remove method IgniteCache.localClear().


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

Branch: refs/heads/ignite-sql-tests
Commit: 7e3ad2442abd2d27b173f4a0eee0afc0d8b369b8
Parents: 4f26c2c
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Fri Mar 13 12:07:09 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Fri Mar 13 12:07:09 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteCache.java     | 16 ---------
 .../processors/cache/IgniteCacheProxy.java      | 12 -------
 .../cache/GridCacheAbstractFullApiSelfTest.java | 38 --------------------
 3 files changed, 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e3ad244/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
index 0944893..5a7c934 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -437,22 +437,6 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K,
V>, IgniteAsyncS
      */
     public void localClearAll(Set<K> keys);
 
-    /**
-     * Clears all entries from this cache and swap storage only if the entry
-     * is not currently locked, and is not participating in a transaction.
-     * <p/>
-     * If {@link CacheConfiguration#isSwapEnabled()} is set to {@code true} and
-     * {@link CacheFlag#SKIP_SWAP} is not enabled, the evicted entries will
-     * also be cleared from swap.
-     * <p/>
-     * Note that this operation is local as it merely clears
-     * an entry from local cache. It does not remove entries from
-     * remote caches or from underlying persistent storage.
-     * This method is not transactionally consistent.
-     * Transactional semantics must be guaranteed outside of Ignite.
-     */
-    public void localClear();
-
     /** {@inheritDoc} */
     @IgniteAsyncSupported
     @Override public <T> T invoke(K key, EntryProcessor<K, V, T> entryProcessor,
Object... arguments);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e3ad244/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 f936ced..d966ae1 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
@@ -1122,18 +1122,6 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
     }
 
     /** {@inheritDoc} */
-    @Override public void localClear() {
-        GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
-        try {
-            delegate.clearLocally();
-        }
-        finally {
-            gate.leave(prev);
-        }
-    }
-
-    /** {@inheritDoc} */
     @Override public <T> T invoke(K key, EntryProcessor<K, V, T> entryProcessor,
Object... args)
         throws EntryProcessorException {
         try {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e3ad244/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 9f7b3dd..d411fab 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
@@ -4157,44 +4157,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
     }
 
     /**
-     * @throws Exception If failed.
-     */
-    public void testLocalClear() throws Exception {
-        Map<String, List<String>> keys = addKeys();
-
-        Set<String> keysToRemove = new HashSet<>();
-
-        Ignite g = grid(0);
-
-        for (int i = 0; i < gridCount(); ++i) {
-            List<String> gridKeys = keys.get(grid(i).name());
-
-            if (gridKeys.size() > 0) {
-                keysToRemove.addAll(gridKeys);
-
-                g = grid(i);
-
-                break;
-            }
-        }
-
-        g.jcache(null).localClear();
-
-        for (int i = 0; i < 500; ++i) {
-            String key = "key" + i;
-
-            boolean found = primaryIgnite(key).jcache(null).localPeek(key) != null;
-
-            if (keysToRemove.contains(key))
-                assertFalse("Found removed key " + key, found);
-            else
-                assertTrue("Not found key " + key, found);
-        }
-
-        assertEquals(0, g.jcache(null).localSize());
-    }
-
-    /**
      * Add 500 keys to cache only on primaries nodes.
      *
      * @return Map grid's name to its primary keys.


Mime
View raw message