#ignite-683: Remove unused methods.

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

Branch: refs/heads/ignite-683-2
Commit: 3a0d1fcdddd15b277933972600973ed97f7e7e27
Parents: 554ff4f
Author: ivasilinets <ivasilin...@gridgain.com>
Authored: Thu Apr 9 19:25:36 2015 +0300
Committer: ivasilinets <ivasilin...@gridgain.com>
Committed: Thu Apr 9 19:25:36 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/CacheProjection.java       | 68 ------------------
 .../processors/cache/GridCacheAdapter.java      | 35 ----------
 .../cache/GridCacheProjectionImpl.java          | 30 --------
 .../processors/cache/GridCacheProxyImpl.java    | 72 --------------------
 .../processors/cache/GridCacheUtils.java        | 28 --------
 .../distributed/dht/GridDhtCacheAdapter.java    |  9 ---
 .../dht/atomic/GridDhtAtomicCache.java          | 15 ----
 .../dht/colocated/GridDhtColocatedCache.java    | 10 ---
 .../distributed/near/GridNearAtomicCache.java   |  5 --
 .../distributed/near/GridNearCacheAdapter.java  | 12 ----
 .../GridCacheMultiNodeLockAbstractTest.java     | 10 +--
 .../dht/GridCacheDhtPreloadPutGetSelfTest.java  |  8 +--
 12 files changed, 8 insertions(+), 294 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3a0d1fcd/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 d68adcf..44e4027 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
@@ -813,25 +813,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
     public Collection<V> values();
 
     /**
-     * Collection of cached values for which this node is primary.
-     * This collection is dynamic and may change with grid topology changes.
-     * Note that this collection will not contain values that are {@code null}
-     * because they were invalided. You can remove elements from this 
collection,
-     * but you cannot add elements to this collection. All removal operation 
will be
-     * reflected on the cache itself.
-     * <p>
-     * Iterator over this collection will not fail if collection was
-     * concurrently updated by another thread. This means that iterator may or
-     * may not return latest values depending on whether they were added before
-     * or after current iterator position.
-     * <p>
-     * NOTE: this operation is not distributed and returns only the values 
cached on this node.
-     *
-     * @return Collection of primary cached values for the current node.
-     */
-    public Collection<V> primaryValues();
-
-    /**
      * Gets set of all entries cached on this node. You can remove
      * elements from this set, but you cannot add elements to this set.
      * All removal operation will be reflected on the cache itself.
@@ -855,18 +836,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
     @Nullable public Set<Cache.Entry<K, V>> entrySet(int part);
 
     /**
-     * Gets set of cache entries for which this node is primary.
-     * This set is dynamic and may change with grid topology changes. You can 
remove
-     * elements from this set, but you cannot add elements to this set.
-     * All removal operation will be reflected on the cache itself.
-     * <p>
-     * NOTE: this operation is not distributed and returns only the entries 
cached on this node.
-     *
-     * @return Primary cache entries that pass through key filter.
-     */
-    public Set<Cache.Entry<K, V>> primaryEntrySet();
-
-    /**
      * Starts new transaction with the specified concurrency and isolation.
      *
      * @param concurrency Concurrency.
@@ -909,20 +878,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
     @Nullable public Transaction tx();
 
     /**
-     * Gets entry from cache with the specified key. The returned entry can
-     * be used even after entry key has been removed from cache. In that
-     * case, every operation on returned entry will result in creation of a
-     * new entry.
-     * <p>
-     * Note that this method can return {@code null} if projection is 
configured as
-     * pre-filtered and entry key and value don't pass key-value filter of the 
projection.
-     *
-     * @param key Entry key.
-     * @return Cache entry or {@code null} if projection pre-filtering was not 
passed.
-     */
-    @Nullable public Cache.Entry<K, V> entry(K key);
-
-    /**
      * Evicts entry associated with given key from cache. Note, that entry 
will be evicted
      * only if it's not used (not participating in any locks or transactions).
      * <p>
@@ -1234,11 +1189,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
     public IgniteInternalFuture<?> removeAllAsync();
 
     /**
-     * @throws IgniteCheckedException If failed.
-     */
-    public void localRemoveAll() throws IgniteCheckedException;
-
-    /**
      * Synchronously acquires lock on a cached object with given
      * key only if the passed in filter (if any) passes. This method
      * together with filter check will be executed as one atomic operation.
@@ -1402,15 +1352,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
     public IgniteInternalFuture<Integer> sizeAsync(CachePeekMode[] peekModes);
 
     /**
-     * Gets the number of all entries cached across all nodes.
-     * <p>
-     * NOTE: this operation is distributed and will query all participating 
nodes for their cache sizes.
-     *
-     * @return Total cache size across all nodes.
-     */
-    public int globalSize() throws IgniteCheckedException;
-
-    /**
      * Gets size of near cache key set. This method will return count of all 
entries in near
      * cache and has O(1) complexity on base cache projection.
      * <p>
@@ -1435,15 +1376,6 @@ public interface CacheProjection<K, V> extends 
Iterable<Cache.Entry<K, V>> {
     public int primarySize();
 
     /**
-     * Gets the number of all primary entries cached across all nodes 
(excluding backups).
-     * <p>
-     * NOTE: this operation is distributed and will query all participating 
nodes for their primary cache sizes.
-     *
-     * @return Total primary cache size across all nodes.
-     */
-    public int globalPrimarySize() 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/3a0d1fcd/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 8dcbe5e..ab440b4 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
@@ -815,16 +815,6 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
         ctx.deploy().onUndeploy(ldr, context());
     }
 
-    /** {@inheritDoc} */
-    @Nullable @Override public Cache.Entry<K, V> entry(K key) {
-        A.notNull(key, "key");
-
-        if (keyCheck)
-            validateCacheKey(key);
-
-        return entryEx(ctx.toCacheKeyObject(key), true).wrap();
-    }
-
     /**
      *
      * @param key Entry key.
@@ -948,11 +938,6 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
     }
 
     /** {@inheritDoc} */
-    @Override public Set<Cache.Entry<K, V>> primaryEntrySet() {
-        return primaryEntrySet((CacheEntryPredicate[])null);
-    }
-
-    /** {@inheritDoc} */
     @Override public Set<K> keySet() {
         return keySet((CacheEntryPredicate[])null);
     }
@@ -986,11 +971,6 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
         return map.values(filter);
     }
 
-    /** {@inheritDoc} */
-    @Override public Collection<V> primaryValues() {
-        return primaryValues((CacheEntryPredicate[])null);
-    }
-
     /**
      *
      * @param key Entry key.
@@ -3319,11 +3299,6 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
     }
 
     /** {@inheritDoc} */
-    @Override public void localRemoveAll() throws IgniteCheckedException {
-        localRemoveAll(null);
-    }
-
-    /** {@inheritDoc} */
     @Override public CacheMetrics metrics() {
         return new CacheMetricsSnapshot(metrics);
     }
@@ -3895,11 +3870,6 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
     }
 
     /** {@inheritDoc} */
-    @Override public int globalSize() throws IgniteCheckedException {
-        return globalSize(false);
-    }
-
-    /** {@inheritDoc} */
     @Override public int nearSize() {
         return 0;
     }
@@ -3910,11 +3880,6 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
     }
 
     /** {@inheritDoc} */
-    @Override public int globalPrimarySize() throws IgniteCheckedException {
-        return globalSize(true);
-    }
-
-    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(GridCacheAdapter.class, this, "name", name(), 
"size", size());
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3a0d1fcd/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 a163340..fb28254 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
@@ -216,16 +216,6 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
     }
 
     /** {@inheritDoc} */
-    @Override public int globalSize() throws IgniteCheckedException {
-        return cache.globalSize();
-    }
-
-    /** {@inheritDoc} */
-    @Override public int globalPrimarySize() throws IgniteCheckedException {
-        return cache.globalPrimarySize();
-    }
-
-    /** {@inheritDoc} */
     @Override public int nearSize() {
         return cctx.config().getCacheMode() == PARTITIONED && 
isNearEnabled(cctx) ?
              cctx.near().nearKeySet(null).size() : 0;
@@ -477,11 +467,6 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
     }
 
     /** {@inheritDoc} */
-    @Override public Collection<V> primaryValues() {
-        return cache.primaryValues();
-    }
-
-    /** {@inheritDoc} */
     @Override public Set<Cache.Entry<K, V>> entrySet() {
         return cache.entrySet();
     }
@@ -498,11 +483,6 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
     }
 
     /** {@inheritDoc} */
-    @Override public Set<Cache.Entry<K, V>> primaryEntrySet() {
-        return cache.primaryEntrySet();
-    }
-
-    /** {@inheritDoc} */
     @Override public boolean skipStore() {
         return skipStore;
     }
@@ -527,11 +507,6 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public Cache.Entry<K, V> entry(K key) {
-        return cache.entry(key);
-    }
-
-    /** {@inheritDoc} */
     @Override public boolean evict(K key) {
         return cache.evict(key);
     }
@@ -671,11 +646,6 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
     }
 
     /** {@inheritDoc} */
-    @Override public void localRemoveAll() throws IgniteCheckedException {
-        cache.localRemoveAll();
-    }
-
-    /** {@inheritDoc} */
     @Override public boolean lock(K key, long timeout) throws 
IgniteCheckedException {
         return cache.lock(key, timeout);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3a0d1fcd/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 0ed5a04..8c6f392 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
@@ -851,18 +851,6 @@ public class GridCacheProxyImpl<K, V> implements 
GridCacheProxy<K, V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Override public Collection<V> primaryValues() {
-        GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
-        try {
-            return delegate.primaryValues();
-        }
-        finally {
-            gate.leave(prev);
-        }
-    }
-
-    /** {@inheritDoc} */
     @Override public Set<Cache.Entry<K, V>> entrySet() {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
@@ -899,18 +887,6 @@ public class GridCacheProxyImpl<K, V> implements 
GridCacheProxy<K, V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Override public Set<Cache.Entry<K, V>> primaryEntrySet() {
-        GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
-        try {
-            return delegate.primaryEntrySet();
-        }
-        finally {
-            gate.leave(prev);
-        }
-    }
-
-    /** {@inheritDoc} */
     @Override public IgniteInternalTx txStartEx(TransactionConcurrency 
concurrency, TransactionIsolation isolation) {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
@@ -989,18 +965,6 @@ public class GridCacheProxyImpl<K, V> implements 
GridCacheProxy<K, V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public Cache.Entry<K, V> entry(K key) {
-        GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
-        try {
-            return delegate.entry(key);
-        }
-        finally {
-            gate.leave(prev);
-        }
-    }
-
-    /** {@inheritDoc} */
     @Override public boolean evict(K key) {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
@@ -1331,18 +1295,6 @@ public class GridCacheProxyImpl<K, V> implements 
GridCacheProxy<K, V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Override public void localRemoveAll() throws IgniteCheckedException {
-        GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
-        try {
-            delegate.localRemoveAll();
-        }
-        finally {
-            gate.leave(prev);
-        }
-    }
-
-    /** {@inheritDoc} */
     @Override public boolean lock(K key, long timeout)
         throws IgniteCheckedException {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
@@ -1488,18 +1440,6 @@ public class GridCacheProxyImpl<K, V> implements 
GridCacheProxy<K, V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Override public int globalSize() throws IgniteCheckedException {
-        GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
-        try {
-            return delegate.globalSize();
-        }
-        finally {
-            gate.leave(prev);
-        }
-    }
-
-    /** {@inheritDoc} */
     @Override public int nearSize() {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
@@ -1524,18 +1464,6 @@ public class GridCacheProxyImpl<K, V> implements 
GridCacheProxy<K, V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Override public int globalPrimarySize() throws IgniteCheckedException {
-        GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
-        try {
-            return delegate.globalPrimarySize();
-        }
-        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/3a0d1fcd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index 8c72bc2..209af3d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -393,34 +393,6 @@ public class GridCacheUtils {
     }
 
     /**
-     * Gets closure which returns {@code Entry} given cache key.
-     * If current cache is DHT and key doesn't belong to current partition,
-     * {@code null} is returned.
-     *
-     * @param ctx Cache context.
-     * @param <K> Cache key type.
-     * @param <V> Cache value type.
-     * @return Closure which returns {@code Entry} given cache key or {@code 
null} if partition is invalid.
-     */
-    public static <K, V> IgniteClosure<K, Cache.Entry<K, V>> cacheKey2Entry(
-        final GridCacheContext<K, V> ctx) {
-        return new IgniteClosure<K, Cache.Entry<K, V>>() {
-            @Nullable @Override public Cache.Entry<K, V> apply(K k) {
-                try {
-                    return ctx.cache().entry(k);
-                }
-                catch (GridDhtInvalidPartitionException ignored) {
-                    return null;
-                }
-            }
-
-            @Override public String toString() {
-                return "Key-to-entry transformer.";
-            }
-        };
-    }
-
-    /**
      * @return Partition to state transformer.
      */
     @SuppressWarnings({"unchecked"})

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3a0d1fcd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index c58e14b..6e6cb04 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -295,15 +295,6 @@ public abstract class GridDhtCacheAdapter<K, V> extends 
GridDistributedCacheAdap
      *
      * @throws GridDhtInvalidPartitionException If partition for the key is no 
longer valid.
      */
-    @Override public Cache.Entry<K, V> entry(K key) throws 
GridDhtInvalidPartitionException {
-        return super.entry(key);
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @throws GridDhtInvalidPartitionException If partition for the key is no 
longer valid.
-     */
     @Override public GridCacheEntryEx entryEx(KeyCacheObject key, boolean 
touch)
         throws GridDhtInvalidPartitionException {
         return super.entryEx(key, touch);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3a0d1fcd/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 8b4c738..02b41f7 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
@@ -250,16 +250,6 @@ public class GridDhtAtomicCache<K, V> extends 
GridDhtCacheAdapter<K, V> {
     }
 
     /** {@inheritDoc} */
-    @Override public Cache.Entry<K, V> entry(K key) throws 
GridDhtInvalidPartitionException {
-        try {
-            return new CacheEntryImpl<>(key, localPeek(key, 
CachePeekModes.ONHEAP_ONLY, null));
-        }
-        catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
     @Override public IgniteInternalFuture<Map<K, V>> getAllAsync(
         @Nullable final Collection<? extends K> keys,
         final boolean forcePrimary,
@@ -549,11 +539,6 @@ public class GridDhtAtomicCache<K, V> extends 
GridDhtCacheAdapter<K, V> {
     }
 
     /** {@inheritDoc} */
-    @Override public void localRemoveAll() throws IgniteCheckedException {
-        removeAll(keySet());
-    }
-
-    /** {@inheritDoc} */
     @Override public IgniteInternalFuture<?> 
localRemoveAll(CacheEntryPredicate filter) {
         return removeAllAsync(keySet(filter), null);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3a0d1fcd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
index 073af66..70a6f78 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
@@ -386,16 +386,6 @@ public class GridDhtColocatedCache<K, V> extends 
GridDhtTransactionalCacheAdapte
     }
 
     /** {@inheritDoc} */
-    @Override public Cache.Entry<K, V> entry(K key) throws 
GridDhtInvalidPartitionException {
-        try {
-            return new CacheEntryImpl<>(key, localPeek(key, 
CachePeekModes.ONHEAP_ONLY, null));
-        }
-        catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
     @Override public void unlockAll(Collection<? extends K> keys) {
         if (keys.isEmpty())
             return;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3a0d1fcd/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 4fe76ef..cc40bc2 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
@@ -608,11 +608,6 @@ public class GridNearAtomicCache<K, V> extends 
GridNearCacheAdapter<K, V> {
     }
 
     /** {@inheritDoc} */
-    @Override public void localRemoveAll() throws IgniteCheckedException {
-        dht.localRemoveAll();
-    }
-
-    /** {@inheritDoc} */
     @Override public IgniteInternalFuture<?> 
localRemoveAll(CacheEntryPredicate filter) {
         return dht.localRemoveAll(filter);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3a0d1fcd/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 6e72f06..7fe0691 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
@@ -410,18 +410,6 @@ public abstract class GridNearCacheAdapter<K, V> extends 
GridDistributedCacheAda
     }
 
     /** {@inheritDoc} */
-    @Override public Cache.Entry<K, V> entry(K key) {
-        // We don't try wrap entry from near or dht cache.
-        // Created object will be wrapped once some method is called.
-        try {
-            return new CacheEntryImpl<>(key, localPeek(key, 
CachePeekModes.ONHEAP_ONLY, null));
-        }
-        catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
     @Override public boolean clearLocally0(K key, @Nullable 
CacheEntryPredicate[] filter) {
         return super.clearLocally0(key, filter) | dht().clearLocally0(key, 
filter);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3a0d1fcd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
index 7037924..ff8622a 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
@@ -156,7 +156,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest 
extends GridCommonAbstr
      * @param key Key.
      */
     @SuppressWarnings({"BusyWait"})
-    private void checkUnlocked(IgniteCache<Integer,String> cache, Integer key) 
{
+    private void checkUnlocked(IgniteCache<Integer,String> cache, Integer key) 
throws IgniteCheckedException {
         assert !cache.isLocalLocked(key, true);
 
         if (partitioned()) {
@@ -199,7 +199,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest 
extends GridCommonAbstr
      * @param cache Cache.
      * @param keys Keys.
      */
-    private void checkUnlocked(IgniteCache<Integer,String> cache, 
Iterable<Integer> keys) {
+    private void checkUnlocked(IgniteCache<Integer,String> cache, 
Iterable<Integer> keys) throws IgniteCheckedException {
         for (Integer key : keys)
             checkUnlocked(cache, key);
     }
@@ -229,7 +229,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest 
extends GridCommonAbstr
      * @param key Key.
      * @return Entries.
      */
-    private String entries(int key) {
+    private String entries(int key) throws IgniteCheckedException {
         if (partitioned()) {
             GridNearCacheAdapter<Integer, String> near1 = near(1);
             GridNearCacheAdapter<Integer, String> near2 = near(2);
@@ -241,8 +241,8 @@ public abstract class GridCacheMultiNodeLockAbstractTest 
extends GridCommonAbstr
                 ", de2=" + dht2.peekEx(key) + ']';
         }
 
-        return "Entries [e1=" + 
((IgniteKernal)ignite1).internalCache(null).entry(key)
-            + ", e2=" + ((IgniteKernal)ignite2).internalCache(null).entry(key) 
+ ']';
+        return "Entries [e1=" + "(" + key + ", " + 
((IgniteKernal)ignite1).internalCache(null).get(key) + ")"
+            + ", e2=" + "(" + key + ", " + 
((IgniteKernal)ignite2).internalCache(null).get(key) + ")" + ']';
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3a0d1fcd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java
index 8a93678..5da5675 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java
@@ -235,14 +235,12 @@ public class GridCacheDhtPreloadPutGetSelfTest extends 
GridCommonAbstractTest {
                             done.set(true);
 
                             for (int j = 0; j < KEY_CNT; j++) {
-                                Cache.Entry<Integer, Integer> entry = 
internalCache(cache).entry(j);
+                                Integer val = internalCache(cache).get(j);
 
-                                assert entry != null;
-
-                                Integer val = entry.getValue();
+                                assert val != null;
 
                                 if (j % FREQUENCY == 0)
-                                    info("Read entry: " + entry.getKey() + " 
-> " + val);
+                                    info("Read entry: " + j + " -> " + val);
 
                                 assert val != null && val == j;
                             }

Reply via email to