ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [08/25] incubator-ignite git commit: # ignite-57
Date Mon, 09 Feb 2015 20:39:25 GMT
# ignite-57


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

Branch: refs/heads/sprint-1
Commit: 1b9c34674784c2724fcb7b20a2fd5ca4ce840554
Parents: 7d3c1d8
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Feb 6 10:00:18 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri Feb 6 11:31:56 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/cache/CacheProjection.java    |   9 +
 .../processors/cache/GridCacheAdapter.java      | 473 +++++------
 .../cache/GridCacheProjectionImpl.java          |   6 +
 .../processors/cache/GridCacheProxyImpl.java    |  13 +
 .../processors/cache/IgniteCacheProxy.java      |  14 +-
 .../IgniteCacheAtomicLocalPeekModesTest.java    |  43 +
 .../cache/IgniteCacheAtomicLocalPeekTest.java   |  43 -
 .../cache/IgniteCacheAtomicLocalSizeTest.java   |  43 -
 .../cache/IgniteCacheAtomicPeekModesTest.java   |  49 ++
 .../cache/IgniteCacheAtomicPeekTest.java        |  49 --
 ...gniteCacheAtomicReplicatedPeekModesTest.java |  32 +
 .../IgniteCacheAtomicReplicatedPeekTest.java    |  32 -
 .../IgniteCacheAtomicReplicatedSizeTest.java    |  32 -
 .../cache/IgniteCacheAtomicSizeTest.java        |  49 --
 .../cache/IgniteCachePeekModesAbstractTest.java | 824 +++++++++++++++++++
 .../cache/IgniteCacheSizeAbstractTest.java      | 496 -----------
 .../cache/IgniteCacheTxLocalPeekModesTest.java  |  43 +
 .../cache/IgniteCacheTxLocalPeekTest.java       |  43 -
 .../cache/IgniteCacheTxLocalSizeTest.java       |  43 -
 .../cache/IgniteCacheTxPeekModesTest.java       |  49 ++
 .../processors/cache/IgniteCacheTxPeekTest.java |  49 --
 .../IgniteCacheTxReplicatedPeekModesTest.java   |  32 +
 .../cache/IgniteCacheTxReplicatedPeekTest.java  |  32 -
 .../cache/IgniteCacheTxReplicatedSizeTest.java  |  32 -
 .../processors/cache/IgniteCacheTxSizeTest.java |  49 --
 .../ignite/testsuites/IgniteCacheTestSuite.java |  19 +-
 26 files changed, 1343 insertions(+), 1255 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1b9c3467/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java
index 3b664bd..54a85d9 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java
@@ -28,6 +28,7 @@ import org.apache.ignite.lang.*;
 import org.apache.ignite.transactions.*;
 import org.jetbrains.annotations.*;
 
+import javax.cache.*;
 import java.sql.*;
 import java.util.*;
 import java.util.Date;
@@ -476,10 +477,18 @@ public interface CacheProjection<K, V> extends Iterable<CacheEntry<K, V>> {
      * @param key Key.
      * @param peekModes Peek modes.
      * @return Value.
+     * @throws IgniteCheckedException If failed.
      */
     @Nullable public V localPeek(K key, CachePeekMode[] peekModes) throws IgniteCheckedException;
 
     /**
+     * @param peekModes Peek modes.
+     * @return Entries iterable.
+     * @throws IgniteCheckedException If failed.
+     */
+    public Iterable<Cache.Entry<K, V>> localEntries(CachePeekMode[] peekModes) throws IgniteCheckedException;
+
+    /**
      * Peeks at cached value using optional set of peek modes. This method will sequentially
      * iterate over given peek modes in the order passed in, and try to peek at value using
      * each peek mode. Once a {@code non-null} value is found, it will be immediately returned.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1b9c3467/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 af4f482..be74645 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
@@ -656,102 +656,27 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
     }
 
     /** {@inheritDoc} */
-    @SuppressWarnings("ForLoopReplaceableByForEach")
-    @Nullable @Override public V localPeek(K key, CachePeekMode[] peekModes) throws IgniteCheckedException {
-        A.notNull(key, "key");
-
+    @Override public Iterable<Cache.Entry<K, V>> localEntries(CachePeekMode[] peekModes) throws IgniteCheckedException {
         assert peekModes != null;
 
-        if (keyCheck)
-            validateCacheKey(key);
-
         ctx.checkSecurity(GridSecurityPermission.CACHE_READ);
 
-        boolean near = false;
-        boolean primary = false;
-        boolean backup = false;
-
-        boolean heap = false;
-        boolean offheap = false;
-        boolean swap = false;
-
-        if (peekModes.length == 0) {
-            near = true;
-            primary = true;
-            backup = true;
-
-            heap = true;
-            offheap = true;
-            swap = true;
-        }
-        else {
-            for (int i = 0; i < peekModes.length; i++) {
-                CachePeekMode peekMode = peekModes[i];
-
-                A.notNull(peekMode, "peekMode");
-
-                switch (peekMode) {
-                    case ALL:
-                        near = true;
-                        primary = true;
-                        backup = true;
-
-                        heap = true;
-                        offheap = true;
-                        swap = true;
-
-                        break;
-
-                    case BACKUP:
-                        backup = true;
-
-                        break;
-
-                    case PRIMARY:
-                        primary = true;
-
-                        break;
-
-                    case NEAR:
-                        near = true;
+        PeekModes modes = parsePeekModes(peekModes);
 
-                        break;
-
-                    case ONHEAP:
-                        heap = true;
-
-                        break;
-
-                    case OFFHEAP:
-                        offheap = true;
-
-                        break;
-
-                    case SWAP:
-                        swap = true;
-
-                        break;
+        return null;
+    }
 
-                    default:
-                        assert false : peekMode;
-                }
-            }
-        }
+    /** {@inheritDoc} */
+    @SuppressWarnings("ForLoopReplaceableByForEach")
+    @Nullable @Override public V localPeek(K key, CachePeekMode[] peekModes) throws IgniteCheckedException {
+        A.notNull(key, "key");
 
-        if (!(heap || offheap || swap)) {
-            heap = true;
-            offheap = true;
-            swap = true;
-        }
+        if (keyCheck)
+            validateCacheKey(key);
 
-        if (!(primary || backup || near)) {
-            primary = true;
-            backup = true;
-            near = true;
-        }
+        ctx.checkSecurity(GridSecurityPermission.CACHE_READ);
 
-        assert heap || offheap || swap;
-        assert primary || backup || near;
+        PeekModes modes = parsePeekModes(peekModes);
 
         try {
             if (ctx.portableEnabled())
@@ -766,11 +691,11 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
                 boolean nearKey;
 
-                if (!(near && primary && backup)) {
+                if (!(modes.near && modes.primary && modes.backup)) {
                     boolean keyPrimary = ctx.affinity().primary(ctx.localNode(), part, topVer);
 
                     if (keyPrimary) {
-                        if (!primary)
+                        if (!modes.primary)
                             return null;
 
                         nearKey = false;
@@ -779,20 +704,20 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
                         boolean keyBackup = ctx.affinity().belongs(ctx.localNode(), part, topVer);
 
                         if (keyBackup) {
-                            if (!backup)
+                            if (!modes.backup)
                                 return null;
 
                             nearKey = false;
                         }
                         else {
-                            if (!near)
+                            if (!modes.near)
                                 return null;
 
                             nearKey = true;
 
                             // Swap and offheap are disabled for near cache.
-                            offheap = false;
-                            swap = false;
+                            modes.offheap = false;
+                            modes.swap = false;
                         }
                     }
                 }
@@ -801,36 +726,36 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
                     if (nearKey) {
                         // Swap and offheap are disabled for near cache.
-                        offheap = false;
-                        swap = false;
+                        modes.offheap = false;
+                        modes.swap = false;
                     }
                 }
 
                 if (nearKey && !ctx.isNear())
                     return null;
 
-                if (heap) {
+                if (modes.heap) {
                     GridCacheEntryEx<K, V> e = nearKey ? peekEx(key) :
                         (ctx.isNear() ? ctx.near().dht().peekEx(key) : peekEx(key));
 
                     if (e != null) {
-                        val = e.peek(heap, offheap, swap, topVer);
+                        val = e.peek(modes.heap, modes.offheap, modes.swap, topVer);
 
-                        offheap = false;
-                        swap = false;
+                        modes.offheap = false;
+                        modes.swap = false;
                     }
                 }
 
-                if (offheap || swap) {
+                if (modes.offheap || modes.swap) {
                     GridCacheSwapManager<K, V> swapMgr = ctx.isNear() ? ctx.near().dht().context().swap() : ctx.swap();
 
-                    GridCacheSwapEntry<V> swapEntry = swapMgr.read(key, offheap, swap);
+                    GridCacheSwapEntry<V> swapEntry = swapMgr.read(key, modes.offheap, modes.swap);
 
                     val = swapEntry != null ? swapEntry.value() : null;
                 }
             }
             else
-                val = localCachePeek0(key, heap, offheap, swap);
+                val = localCachePeek0(key, modes.heap, modes.offheap, modes.swap);
 
             if (ctx.portableEnabled())
                 val = (V)ctx.unwrapPortableIfNeeded(val, ctx.keepPortable());
@@ -1323,22 +1248,22 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
     /** {@inheritDoc} */
     @Override public Set<CacheEntry<K, V>> primaryEntrySet() {
-        return primaryEntrySet((IgnitePredicate<CacheEntry<K, V>>[])null);
+        return primaryEntrySet((IgnitePredicate<CacheEntry<K, V>>[]) null);
     }
 
     /** {@inheritDoc} */
     @Override public Set<K> keySet() {
-        return keySet((IgnitePredicate<CacheEntry<K, V>>[])null);
+        return keySet((IgnitePredicate<CacheEntry<K, V>>[]) null);
     }
 
     /** {@inheritDoc} */
     @Override public Set<K> primaryKeySet() {
-        return primaryKeySet((IgnitePredicate<CacheEntry<K, V>>[])null);
+        return primaryKeySet((IgnitePredicate<CacheEntry<K, V>>[]) null);
     }
 
     /** {@inheritDoc} */
     @Override public Collection<V> values() {
-        return values((IgnitePredicate<CacheEntry<K, V>>[])null);
+        return values((IgnitePredicate<CacheEntry<K, V>>[]) null);
     }
 
     /** {@inheritDoc} */
@@ -1612,7 +1537,8 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         return getAllAsync(Collections.singletonList(key), /*force primary*/true, /*skip tx*/false, null, null,
             taskName, true).chain(new CX1<IgniteInternalFuture<Map<K, V>>, V>() {
-            @Override public V applyx(IgniteInternalFuture<Map<K, V>> e) throws IgniteCheckedException {
+            @Override
+            public V applyx(IgniteInternalFuture<Map<K, V>> e) throws IgniteCheckedException {
                 return e.get().get(key);
             }
         });
@@ -1634,7 +1560,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
     /** {@inheritDoc} */
     @Nullable @Override public V reload(K key) throws IgniteCheckedException {
-        return reload(key, (IgnitePredicate<CacheEntry<K, V>>[])null);
+        return reload(key, (IgnitePredicate<CacheEntry<K, V>>[]) null);
     }
 
     /** {@inheritDoc} */
@@ -1663,7 +1589,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
     @Override public IgniteInternalFuture<?> reloadAllAsync() {
         ctx.denyOnFlags(F.asList(LOCAL, READ));
 
-        return reloadAllAsync(keySet(), (IgnitePredicate<CacheEntry<K, V>>[])null);
+        return reloadAllAsync(keySet(), (IgnitePredicate<CacheEntry<K, V>>[]) null);
     }
 
     /**
@@ -1684,7 +1610,9 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         String taskName,
         final IgniteBiInClosure<K, V> vis) {
         return ctx.closures().callLocalSafe(new GPC<Object>() {
-            @Nullable @Override public Object call() {
+            @Nullable
+            @Override
+            public Object call() {
                 try {
                     ctx.store().loadAllFromStore(tx, keys, vis);
                 }
@@ -1895,7 +1823,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
     /** {@inheritDoc} */
     @Override public void evictAll(Collection<? extends K> keys) {
-        evictAll(keys, (IgnitePredicate<CacheEntry<K, V>>[])null);
+        evictAll(keys, (IgnitePredicate<CacheEntry<K, V>>[]) null);
     }
 
     /** {@inheritDoc} */
@@ -1929,8 +1857,9 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         if (ctx.config().getInterceptor() != null)
             fut =  fut.chain(new CX1<IgniteInternalFuture<V>, V>() {
-                @Override public V applyx(IgniteInternalFuture<V> f) throws IgniteCheckedException {
-                    return (V)ctx.config().getInterceptor().onGet(key, f.get());
+                @Override
+                public V applyx(IgniteInternalFuture<V> f) throws IgniteCheckedException {
+                    return (V) ctx.config().getInterceptor().onGet(key, f.get());
                 }
             });
 
@@ -2502,11 +2431,13 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         ctx.denyOnLocalRead();
 
         return asyncOp(new AsyncInOp(drMap.keySet()) {
-            @Override public IgniteInternalFuture<?> inOp(IgniteTxLocalAdapter<K, V> tx) {
+            @Override
+            public IgniteInternalFuture<?> inOp(IgniteTxLocalAdapter<K, V> tx) {
                 return tx.putAllDrAsync(ctx, drMap);
             }
 
-            @Override public String toString() {
+            @Override
+            public String toString() {
                 return "putAllDrAsync [drMap=" + drMap + ']';
             }
         });
@@ -2528,7 +2459,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
             @Nullable @Override public EntryProcessorResult<T> op(IgniteTxLocalAdapter<K, V> tx)
                 throws IgniteCheckedException {
                 Map<? extends K, EntryProcessor<K, V, Object>> invokeMap =
-                    Collections.singletonMap(key, (EntryProcessor<K, V, Object>)entryProcessor);
+                    Collections.singletonMap(key, (EntryProcessor<K, V, Object>) entryProcessor);
 
                 IgniteInternalFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>> fut =
                     tx.invokeAsync(ctx, invokeMap, args);
@@ -2560,10 +2491,13 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         ctx.denyOnLocalRead();
 
         return syncOp(new SyncOp<Map<K, EntryProcessorResult<T>>>(keys.size() == 1) {
-            @Nullable @Override public Map<K, EntryProcessorResult<T>> op(IgniteTxLocalAdapter tx)
+            @Nullable
+            @Override
+            public Map<K, EntryProcessorResult<T>> op(IgniteTxLocalAdapter tx)
                 throws IgniteCheckedException {
                 Map<? extends K, EntryProcessor<K, V, Object>> invokeMap = F.viewAsMap(keys, new C1<K, EntryProcessor<K, V, Object>>() {
-                    @Override public EntryProcessor apply(K k) {
+                    @Override
+                    public EntryProcessor apply(K k) {
                         return entryProcessor;
                     }
                 });
@@ -2594,7 +2528,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         IgniteInternalFuture<?> fut = asyncOp(new AsyncInOp(key) {
             @Override public IgniteInternalFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>> inOp(IgniteTxLocalAdapter<K, V> tx) {
                 Map<? extends K, EntryProcessor<K, V, Object>> invokeMap =
-                    Collections.singletonMap(key, (EntryProcessor<K, V, Object>)entryProcessor);
+                    Collections.singletonMap(key, (EntryProcessor<K, V, Object>) entryProcessor);
 
                 return tx.invokeAsync(ctx, invokeMap, args);
             }
@@ -2693,7 +2627,8 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
             (IgniteInternalFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>)fut;
 
         return fut0.chain(new CX1<IgniteInternalFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>, Map<K, EntryProcessorResult<T>>>() {
-            @Override public Map<K, EntryProcessorResult<T>> applyx(
+            @Override
+            public Map<K, EntryProcessorResult<T>> applyx(
                 IgniteInternalFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>> fut)
                 throws IgniteCheckedException {
                 GridCacheReturn<Map<K, EntryProcessorResult<T>>> ret = fut.get();
@@ -2755,12 +2690,14 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         ctx.denyOnLocalRead();
 
         return asyncOp(new AsyncOp<Boolean>(key) {
-            @Override public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter<K, V> tx) {
+            @Override
+            public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter<K, V> tx) {
                 return tx.putAllAsync(ctx, F.t(key, val), false, entry, ttl, filter).chain(
-                    (IgniteClosure<IgniteInternalFuture<GridCacheReturn<V>>, Boolean>)RET2FLAG);
+                    (IgniteClosure<IgniteInternalFuture<GridCacheReturn<V>>, Boolean>) RET2FLAG);
             }
 
-            @Override public String toString() {
+            @Override
+            public String toString() {
                 return "putxAsync [key=" + key + ", val=" + val + ", filter=" + Arrays.toString(filter) + ']';
             }
         });
@@ -2804,12 +2741,14 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         ctx.denyOnLocalRead();
 
         IgniteInternalFuture<V> fut = ctx.wrapClone(asyncOp(new AsyncOp<V>(key) {
-            @Override public IgniteInternalFuture<V> op(IgniteTxLocalAdapter<K, V> tx) {
+            @Override
+            public IgniteInternalFuture<V> op(IgniteTxLocalAdapter<K, V> tx) {
                 return tx.putAllAsync(ctx, F.t(key, val), true, null, -1, ctx.noPeekArray())
-                    .chain((IgniteClosure<IgniteInternalFuture<GridCacheReturn<V>>, V>)RET2VAL);
+                    .chain((IgniteClosure<IgniteInternalFuture<GridCacheReturn<V>>, V>) RET2VAL);
             }
 
-            @Override public String toString() {
+            @Override
+            public String toString() {
                 return "putIfAbsentAsync [key=" + key + ", val=" + val + ']';
             }
         }));
@@ -2836,11 +2775,13 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         ctx.denyOnLocalRead();
 
         Boolean stored = syncOp(new SyncOp<Boolean>(true) {
-            @Override public Boolean op(IgniteTxLocalAdapter<K, V> tx) throws IgniteCheckedException {
+            @Override
+            public Boolean op(IgniteTxLocalAdapter<K, V> tx) throws IgniteCheckedException {
                 return tx.putAllAsync(ctx, F.t(key, val), false, null, -1, ctx.noPeekArray()).get().success();
             }
 
-            @Override public String toString() {
+            @Override
+            public String toString() {
                 return "putxIfAbsent [key=" + key + ", val=" + val + ']';
             }
         });
@@ -2949,11 +2890,13 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         ctx.denyOnLocalRead();
 
         return syncOp(new SyncOp<Boolean>(true) {
-            @Override public Boolean op(IgniteTxLocalAdapter<K, V> tx) throws IgniteCheckedException {
+            @Override
+            public Boolean op(IgniteTxLocalAdapter<K, V> tx) throws IgniteCheckedException {
                 return tx.putAllAsync(ctx, F.t(key, val), false, null, -1, ctx.hasPeekArray()).get().success();
             }
 
-            @Override public String toString() {
+            @Override
+            public String toString() {
                 return "replacex [key=" + key + ", val=" + val + ']';
             }
         });
@@ -2971,12 +2914,14 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         ctx.denyOnLocalRead();
 
         return asyncOp(new AsyncOp<Boolean>(key) {
-            @Override public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter<K, V> tx) {
+            @Override
+            public IgniteInternalFuture<Boolean> op(IgniteTxLocalAdapter<K, V> tx) {
                 return tx.putAllAsync(ctx, F.t(key, val), false, null, -1, ctx.hasPeekArray()).chain(
-                    (IgniteClosure<IgniteInternalFuture<GridCacheReturn<V>>, Boolean>)RET2FLAG);
+                    (IgniteClosure<IgniteInternalFuture<GridCacheReturn<V>>, Boolean>) RET2FLAG);
             }
 
-            @Override public String toString() {
+            @Override
+            public String toString() {
                 return "replacexAsync [key=" + key + ", val=" + val + ']';
             }
         });
@@ -3100,11 +3045,13 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         ctx.denyOnLocalRead();
 
         return asyncOp(new AsyncInOp(m.keySet()) {
-            @Override public IgniteInternalFuture<?> inOp(IgniteTxLocalAdapter<K, V> tx) {
+            @Override
+            public IgniteInternalFuture<?> inOp(IgniteTxLocalAdapter<K, V> tx) {
                 return tx.putAllAsync(ctx, m, false, null, -1, filter);
             }
 
-            @Override public String toString() {
+            @Override
+            public String toString() {
                 return "putAllAsync [map=" + m + ", filter=" + Arrays.toString(filter) + ']';
             }
         });
@@ -3131,16 +3078,18 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
             validateCacheKey(key);
 
         V prevVal = ctx.cloneOnFlag(syncOp(new SyncOp<V>(true) {
-            @Override public V op(IgniteTxLocalAdapter<K, V> tx) throws IgniteCheckedException {
+            @Override
+            public V op(IgniteTxLocalAdapter<K, V> tx) throws IgniteCheckedException {
                 V ret = tx.removeAllAsync(ctx, Collections.singletonList(key), entry, true, filter).get().value();
 
                 if (ctx.config().getInterceptor() != null)
-                    return (V)ctx.config().getInterceptor().onBeforeRemove(key, ret).get2();
+                    return (V) ctx.config().getInterceptor().onBeforeRemove(key, ret).get2();
 
                 return ret;
             }
 
-            @Override public String toString() {
+            @Override
+            public String toString() {
                 return "remove [key=" + key + ", filter=" + Arrays.toString(filter) + ']';
             }
         }));
@@ -3255,11 +3204,13 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         ctx.denyOnLocalRead();
 
         IgniteInternalFuture<Object> fut = asyncOp(new AsyncInOp(keys) {
-            @Override public IgniteInternalFuture<?> inOp(IgniteTxLocalAdapter<K, V> tx) {
+            @Override
+            public IgniteInternalFuture<?> inOp(IgniteTxLocalAdapter<K, V> tx) {
                 return tx.removeAllAsync(ctx, keys, null, false, filter);
             }
 
-            @Override public String toString() {
+            @Override
+            public String toString() {
                 return "removeAllAsync [keys=" + keys + ", filter=" + Arrays.toString(filter) + ']';
             }
         });
@@ -3409,11 +3360,13 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         ctx.dr().onReceiveCacheEntriesReceived(drMap.size());
 
         return asyncOp(new AsyncInOp(drMap.keySet()) {
-            @Override public IgniteInternalFuture<?> inOp(IgniteTxLocalAdapter<K, V> tx) {
+            @Override
+            public IgniteInternalFuture<?> inOp(IgniteTxLocalAdapter<K, V> tx) {
                 return tx.removeAllDrAsync(ctx, drMap);
             }
 
-            @Override public String toString() {
+            @Override
+            public String toString() {
                 return "removeAllDrASync [drMap=" + drMap + ']';
             }
         });
@@ -3429,7 +3382,8 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         ctx.denyOnLocalRead();
 
         return syncOp(new SyncOp<GridCacheReturn<V>>(true) {
-            @Override public GridCacheReturn<V> op(IgniteTxLocalAdapter<K, V> tx) throws IgniteCheckedException {
+            @Override
+            public GridCacheReturn<V> op(IgniteTxLocalAdapter<K, V> tx) throws IgniteCheckedException {
                 // Register before hiding in the filter.
                 if (ctx.deploymentEnabled())
                     ctx.deploy().registerClass(oldVal);
@@ -3437,7 +3391,8 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
                 return tx.putAllAsync(ctx, F.t(key, newVal), true, null, -1, ctx.equalsPeekArray(oldVal)).get();
             }
 
-            @Override public String toString() {
+            @Override
+            public String toString() {
                 return "replace [key=" + key + ", oldVal=" + oldVal + ", newVal=" + newVal + ']';
             }
         });
@@ -3518,7 +3473,8 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         validateCacheValue(val);
 
         boolean removed = syncOp(new SyncOp<Boolean>(true) {
-            @Override public Boolean op(IgniteTxLocalAdapter<K, V> tx) throws IgniteCheckedException {
+            @Override
+            public Boolean op(IgniteTxLocalAdapter<K, V> tx) throws IgniteCheckedException {
                 // Register before hiding in the filter.
                 if (ctx.deploymentEnabled())
                     ctx.deploy().registerClass(val);
@@ -3526,13 +3482,14 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
                 K key0 = key;
 
                 if (ctx.portableEnabled())
-                    key0 = (K)ctx.marshalToPortable(key);
+                    key0 = (K) ctx.marshalToPortable(key);
 
                 return tx.removeAllAsync(ctx, Collections.singletonList(key0), null, false,
                     ctx.vararg(F.<K, V>cacheContainsPeek(val))).get().success();
             }
 
-            @Override public String toString() {
+            @Override
+            public String toString() {
                 return "remove [key=" + key + ", val=" + val + ']';
             }
         });
@@ -4095,115 +4052,29 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
     /** {@inheritDoc} */
     @SuppressWarnings("ForLoopReplaceableByForEach")
     @Override public int localSize(CachePeekMode[] peekModes) throws IgniteCheckedException {
-        assert peekModes != null;
-
-        boolean near = false;
-        boolean primary = false;
-        boolean backup = false;
-
-        boolean heap = false;
-        boolean offheap = false;
-        boolean swap = false;
-
-        if (peekModes.length == 0) {
-            near = true;
-            primary = true;
-            backup = true;
-
-            heap = true;
-            offheap = true;
-            swap = true;
-        }
-        else {
-            for (int i = 0; i < peekModes.length; i++) {
-                CachePeekMode peekMode = peekModes[i];
-
-                A.notNull(peekMode, "peekMode");
-
-                switch (peekMode) {
-                    case ALL:
-                        near = true;
-                        primary = true;
-                        backup = true;
-
-                        heap = true;
-                        offheap = true;
-                        swap = true;
-
-                        break;
-
-                    case BACKUP:
-                        backup = true;
-
-                        break;
-
-                    case PRIMARY:
-                        primary = true;
-
-                        break;
-
-                    case NEAR:
-                        near = true;
-
-                        break;
-
-                    case ONHEAP:
-                        heap = true;
-
-                        break;
-
-                    case OFFHEAP:
-                        offheap = true;
-
-                        break;
-
-                    case SWAP:
-                        swap = true;
-
-                        break;
-
-                    default:
-                        assert false : peekMode;
-                }
-            }
-        }
-
-        if (!(heap || offheap || swap)) {
-            heap = true;
-            offheap = true;
-            swap = true;
-        }
-
-        if (!(primary || backup || near)) {
-            primary = true;
-            backup = true;
-            near = true;
-        }
-
-        assert heap || offheap || swap;
-        assert primary || backup || near;
+        PeekModes modes = parsePeekModes(peekModes);
 
         int size = 0;
 
         if (ctx.isLocal()) {
-            primary = true;
-            backup = true;
+            modes.primary = true;
+            modes.backup = true;
 
-            if (heap)
+            if (modes.heap)
                 size += size();
         }
         else {
-            if (heap) {
-                if (near)
+            if (modes.heap) {
+                if (modes.near)
                     size += nearSize();
 
                 GridCacheAdapter cache = ctx.isNear() ? ctx.near().dht() : ctx.cache();
 
-                if (!(primary && backup)) {
-                    if (primary)
+                if (!(modes.primary && modes.backup)) {
+                    if (modes.primary)
                         size += cache.primarySize();
 
-                    if (backup)
+                    if (modes.backup)
                         size += (cache.size() - cache.primarySize());
                 }
                 else
@@ -4212,16 +4083,16 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
         }
 
         // Swap and offheap are disabled for near cache.
-        if (primary || backup) {
+        if (modes.primary || modes.backup) {
             long topVer = ctx.affinity().affinityTopologyVersion();
 
             GridCacheSwapManager<K, V> swapMgr = ctx.isNear() ? ctx.near().dht().context().swap() : ctx.swap();
 
-            if (swap)
-                size += swapMgr.swapEntriesCount(primary, backup, topVer);
+            if (modes.swap)
+                size += swapMgr.swapEntriesCount(modes.primary, modes.backup, topVer);
 
-            if (offheap)
-                size += swapMgr.offheapEntriesCount(primary, backup, topVer);
+            if (modes.offheap)
+                size += swapMgr.offheapEntriesCount(modes.primary, modes.backup, topVer);
         }
 
         return size;
@@ -5403,6 +5274,114 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
     }
 
     /**
+     *
+     */
+    private static class PeekModes {
+        boolean near;
+        boolean primary;
+        boolean backup;
+
+        boolean heap;
+        boolean offheap;
+        boolean swap;
+
+        /** {@inheritDoc} */
+        @Override public String toString() {
+            return S.toString(PeekModes.class, this);
+        }
+    }
+
+    /**
+     * @param peekModes Cache peek modes array.
+     * @return Peek modes flags.
+     */
+    private static PeekModes parsePeekModes(CachePeekMode[] peekModes) {
+        assert peekModes != null;
+
+        PeekModes modes = new PeekModes();
+
+        if (peekModes.length == 0) {
+            modes.near = true;
+            modes.primary = true;
+            modes.backup = true;
+
+            modes.heap = true;
+            modes.offheap = true;
+            modes.swap = true;
+        }
+        else {
+            for (int i = 0; i < peekModes.length; i++) {
+                CachePeekMode peekMode = peekModes[i];
+
+                A.notNull(peekMode, "peekMode");
+
+                switch (peekMode) {
+                    case ALL:
+                        modes.near = true;
+                        modes.primary = true;
+                        modes.backup = true;
+
+                        modes.heap = true;
+                        modes.offheap = true;
+                        modes.swap = true;
+
+                        break;
+
+                    case BACKUP:
+                        modes.backup = true;
+
+                        break;
+
+                    case PRIMARY:
+                        modes.primary = true;
+
+                        break;
+
+                    case NEAR:
+                        modes.near = true;
+
+                        break;
+
+                    case ONHEAP:
+                        modes.heap = true;
+
+                        break;
+
+                    case OFFHEAP:
+                        modes.offheap = true;
+
+                        break;
+
+                    case SWAP:
+                        modes.swap = true;
+
+                        break;
+
+                    default:
+                        assert false : peekMode;
+                }
+            }
+        }
+
+        if (!(modes.heap || modes.offheap || modes.swap)) {
+            modes.heap = true;
+            modes.offheap = true;
+            modes.swap = true;
+        }
+
+        if (!(modes.primary || modes.backup || modes.near)) {
+            modes.primary = true;
+            modes.backup = true;
+            modes.near = true;
+        }
+
+        assert modes.heap || modes.offheap || modes.swap;
+        assert modes.primary || modes.backup || modes.near;
+
+        return modes;
+    }
+
+    /**
      * @param plc Explicitly specified expiry policy for cache operation.
      * @return Expiry policy wrapper.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1b9c3467/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 008b829..80b7341 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
@@ -36,6 +36,7 @@ import org.apache.ignite.portables.*;
 import org.apache.ignite.transactions.*;
 import org.jetbrains.annotations.*;
 
+import javax.cache.*;
 import javax.cache.expiry.*;
 import javax.cache.processor.*;
 import java.io.*;
@@ -1025,6 +1026,11 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
     }
 
     /** {@inheritDoc} */
+    @Override public Iterable<Cache.Entry<K, V>> localEntries(CachePeekMode[] peekModes) throws IgniteCheckedException {
+        return cache.localEntries(peekModes);
+    }
+
+    /** {@inheritDoc} */
     @Override public V peek(K key, @Nullable Collection<GridCachePeekMode> modes) throws IgniteCheckedException {
         V val = cache.peek(key, modes);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1b9c3467/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 566f716..8fd125e 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
@@ -35,6 +35,7 @@ import org.apache.ignite.mxbean.*;
 import org.apache.ignite.transactions.*;
 import org.jetbrains.annotations.*;
 
+import javax.cache.*;
 import javax.cache.expiry.*;
 import javax.cache.processor.*;
 import java.io.*;
@@ -1230,6 +1231,18 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
     }
 
     /** {@inheritDoc} */
+    @Override public Iterable<Cache.Entry<K, V>> localEntries(CachePeekMode[] peekModes) throws IgniteCheckedException {
+        GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
+
+        try {
+            return delegate.localEntries(peekModes);
+        }
+        finally {
+            gate.leave(prev);
+        }
+    }
+
+    /** {@inheritDoc} */
     @Nullable @Override public V peek(K key, @Nullable Collection<GridCachePeekMode> modes) throws IgniteCheckedException {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1b9c3467/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 3b24831..dc62f19 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
@@ -241,8 +241,17 @@ public class IgniteCacheProxy<K, V> extends IgniteAsyncSupportAdapter<IgniteCach
 
     /** {@inheritDoc} */
     @Override public Iterable<Entry<K, V>> localEntries(CachePeekMode... peekModes) throws CacheException {
-        // TODO IGNITE-1.
-        throw new UnsupportedOperationException();
+        GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
+
+        try {
+            return delegate.localEntries(peekModes);
+        }
+        catch (IgniteCheckedException e) {
+            throw cacheException(e);
+        }
+        finally {
+            gate.leave(prev);
+        }
     }
 
     /** {@inheritDoc} */
@@ -736,7 +745,6 @@ public class IgniteCacheProxy<K, V> extends IgniteAsyncSupportAdapter<IgniteCach
 
     /** {@inheritDoc} */
     @Override public void clear() {
-        // TODO IGNITE-1.
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
         try {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1b9c3467/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicLocalPeekModesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicLocalPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicLocalPeekModesTest.java
new file mode 100644
index 0000000..024774b
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicLocalPeekModesTest.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
+
+/**
+ *
+ */
+public class IgniteCacheAtomicLocalPeekModesTest extends IgniteCachePeekModesAbstractTest {
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicityMode atomicityMode() {
+        return ATOMIC;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected int gridCount() {
+        return 1;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected CacheMode cacheMode() {
+        return LOCAL;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1b9c3467/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicLocalPeekTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicLocalPeekTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicLocalPeekTest.java
deleted file mode 100644
index 4c3eb6a..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicLocalPeekTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.*;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.*;
-import static org.apache.ignite.cache.CacheMode.*;
-
-/**
- *
- */
-public class IgniteCacheAtomicLocalPeekTest extends IgniteCachePeekAbstractTest {
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return ATOMIC;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 1;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return LOCAL;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1b9c3467/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicLocalSizeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicLocalSizeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicLocalSizeTest.java
deleted file mode 100644
index aaf5a5a..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicLocalSizeTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.*;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.*;
-import static org.apache.ignite.cache.CacheMode.*;
-
-/**
- *
- */
-public class IgniteCacheAtomicLocalSizeTest extends IgniteCacheSizeAbstractTest {
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return ATOMIC;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 1;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return LOCAL;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1b9c3467/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPeekModesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPeekModesTest.java
new file mode 100644
index 0000000..bf595f0
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPeekModesTest.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.*;
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
+
+/**
+ *
+ */
+public class IgniteCacheAtomicPeekModesTest extends IgniteCachePeekModesAbstractTest {
+    /** {@inheritDoc} */
+    @Override protected int gridCount() {
+        return 4;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected CacheMode cacheMode() {
+        return PARTITIONED;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicityMode atomicityMode() {
+        return ATOMIC;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicWriteOrderMode atomicWriteOrderMode() {
+        return PRIMARY;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1b9c3467/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPeekTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPeekTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPeekTest.java
deleted file mode 100644
index c2085ec..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPeekTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.*;
-
-import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.*;
-import static org.apache.ignite.cache.CacheAtomicityMode.*;
-import static org.apache.ignite.cache.CacheMode.*;
-
-/**
- *
- */
-public class IgniteCacheAtomicPeekTest extends IgniteCachePeekAbstractTest {
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 4;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return PARTITIONED;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return ATOMIC;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicWriteOrderMode atomicWriteOrderMode() {
-        return PRIMARY;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1b9c3467/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicReplicatedPeekModesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicReplicatedPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicReplicatedPeekModesTest.java
new file mode 100644
index 0000000..7286ba3
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicReplicatedPeekModesTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheMode.*;
+
+/**
+ *
+ */
+public class IgniteCacheAtomicReplicatedPeekModesTest extends IgniteCacheAtomicPeekModesTest {
+    /** {@inheritDoc} */
+    @Override protected CacheMode cacheMode() {
+        return REPLICATED;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1b9c3467/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicReplicatedPeekTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicReplicatedPeekTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicReplicatedPeekTest.java
deleted file mode 100644
index 4d34827..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicReplicatedPeekTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.*;
-
-import static org.apache.ignite.cache.CacheMode.*;
-
-/**
- *
- */
-public class IgniteCacheAtomicReplicatedPeekTest extends IgniteCacheAtomicPeekTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return REPLICATED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1b9c3467/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicReplicatedSizeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicReplicatedSizeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicReplicatedSizeTest.java
deleted file mode 100644
index f4b466a..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicReplicatedSizeTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.*;
-
-import static org.apache.ignite.cache.CacheMode.*;
-
-/**
- *
- */
-public class IgniteCacheAtomicReplicatedSizeTest extends IgniteCacheAtomicSizeTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return REPLICATED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1b9c3467/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicSizeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicSizeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicSizeTest.java
deleted file mode 100644
index 62b52ff..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicSizeTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.*;
-
-import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.*;
-import static org.apache.ignite.cache.CacheAtomicityMode.*;
-import static org.apache.ignite.cache.CacheMode.*;
-
-/**
- *
- */
-public class IgniteCacheAtomicSizeTest extends IgniteCacheSizeAbstractTest {
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return ATOMIC;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 4;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return PARTITIONED;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicWriteOrderMode atomicWriteOrderMode() {
-        return PRIMARY;
-    }
-}


Mime
View raw message