ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [33/34] incubator-ignite git commit: # ignite-51
Date Wed, 25 Feb 2015 14:07:13 GMT
# ignite-51


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

Branch: refs/heads/ignite-51
Commit: 760182eac69f1000485960ae74036f82d9fa53aa
Parents: 8b86bde
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Feb 25 11:55:31 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Feb 25 16:48:18 2015 +0300

----------------------------------------------------------------------
 .../ClientAbstractMultiNodeSelfTest.java        |  12 +-
 .../internal/managers/GridManagerAdapter.java   |   4 +-
 .../processors/cache/CacheObjectImpl.java       |  46 ++++
 .../processors/cache/GridCacheAdapter.java      |  21 +-
 .../cache/GridCacheAffinityManager.java         |   2 +-
 .../processors/cache/GridCacheAtomicFuture.java |   2 +-
 .../cache/GridCacheClearAllRunnable.java        |  22 +-
 .../processors/cache/GridCacheContext.java      |   2 +-
 .../cache/GridCacheDeploymentManager.java       |   5 +-
 .../cache/GridCacheEvictionManager.java         |   8 +-
 .../processors/cache/GridCacheIoManager.java    |  48 ++--
 .../processors/cache/GridCacheMvccManager.java  |   4 +-
 .../cache/GridCacheOffheapSwapEntry.java        |   8 +-
 .../GridCachePartitionExchangeManager.java      |  22 +-
 .../cache/GridCacheProjectionImpl.java          |   4 +-
 .../cache/GridCacheSharedContext.java           |  18 +-
 .../processors/cache/GridCacheSwapManager.java  |   5 +-
 .../processors/cache/GridCacheTtlManager.java   |   8 +-
 .../processors/cache/GridCacheUtils.java        |  20 +-
 .../processors/cache/KeyCacheObjectImpl.java    |  50 ++++
 ...ridCacheOptimisticCheckPreparedTxFuture.java |  13 +-
 .../distributed/GridDistributedTxMapping.java   |  12 +-
 .../GridDistributedTxPrepareRequest.java        |   2 +-
 .../GridDistributedTxRemoteAdapter.java         |  98 ++++----
 .../dht/GridClientPartitionTopology.java        |  16 +-
 .../dht/GridDhtAssignmentFetchFuture.java       |   4 +-
 .../cache/distributed/dht/GridDhtCache.java     |   2 +-
 .../distributed/dht/GridDhtCacheAdapter.java    |   2 +-
 .../cache/distributed/dht/GridDhtGetFuture.java | 167 +++++++------
 .../distributed/dht/GridDhtLockFuture.java      |  72 +++---
 .../dht/GridDhtPartitionTopology.java           |  16 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |  44 ++--
 .../dht/GridDhtTransactionalCacheAdapter.java   | 213 ++++++++--------
 .../distributed/dht/GridDhtTxFinishFuture.java  |  32 +--
 .../cache/distributed/dht/GridDhtTxLocal.java   |  28 +--
 .../distributed/dht/GridDhtTxLocalAdapter.java  | 180 ++++++-------
 .../cache/distributed/dht/GridDhtTxMapping.java |   4 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java | 154 ++++++------
 .../cache/distributed/dht/GridDhtTxRemote.java  |  29 +--
 .../distributed/dht/GridNoStorageCacheMap.java  |  26 +-
 .../dht/GridPartitionedGetFuture.java           |  39 +--
 .../dht/atomic/GridDhtAtomicCache.java          | 155 ++++++------
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |  16 +-
 .../atomic/GridNearAtomicUpdateResponse.java    |  20 ++
 .../dht/colocated/GridDhtColocatedCache.java    | 138 ++++++----
 .../colocated/GridDhtColocatedLockFuture.java   | 250 ++++++++++---------
 .../dht/preloader/GridDhtForceKeysFuture.java   |  34 +--
 .../preloader/GridDhtPartitionDemandPool.java   |  62 ++---
 .../preloader/GridDhtPartitionSupplyPool.java   |  77 +++---
 .../GridDhtPartitionsExchangeFuture.java        |  27 +-
 .../dht/preloader/GridDhtPreloader.java         |  42 ++--
 .../preloader/GridDhtPreloaderAssignments.java  |   2 +-
 .../distributed/near/GridNearAtomicCache.java   |  44 ++--
 .../distributed/near/GridNearCacheAdapter.java  |  76 +++---
 .../distributed/near/GridNearCacheEntry.java    |   2 +-
 .../distributed/near/GridNearGetFuture.java     |  81 +++---
 .../distributed/near/GridNearLockFuture.java    | 126 +++++-----
 .../distributed/near/GridNearLockMapping.java   |  23 +-
 .../near/GridNearTransactionalCache.java        |  89 ++++---
 .../near/GridNearTxFinishFuture.java            |  28 +--
 .../cache/distributed/near/GridNearTxLocal.java | 233 ++++++++---------
 .../near/GridNearTxPrepareFuture.java           |  90 +++----
 .../distributed/near/GridNearTxRemote.java      |  26 +-
 .../GridCacheAttributesMvccEntryExtras.java     |   6 +-
 .../GridCacheAttributesMvccTtlEntryExtras.java  |   6 +-
 ...idCacheAttributesObsoleteTtlEntryExtras.java |   8 +-
 .../GridCacheAttributesTtlEntryExtras.java      |   2 +-
 .../cache/extras/GridCacheMvccEntryExtras.java  |   6 +-
 .../GridCacheMvccObsoleteTtlEntryExtras.java    |   6 +-
 .../extras/GridCacheObsoleteEntryExtras.java    |   2 +-
 .../extras/GridCacheObsoleteTtlEntryExtras.java |   6 +-
 .../cache/extras/GridCacheTtlEntryExtras.java   |   2 +-
 .../processors/cache/local/GridLocalCache.java  |  39 +--
 .../cache/local/GridLocalLockCallback.java      |   5 +-
 .../cache/local/GridLocalLockFuture.java        |  18 +-
 .../processors/cache/local/GridLocalTx.java     |  10 +-
 .../cache/local/GridLocalTxFuture.java          |  14 +-
 .../local/atomic/GridLocalAtomicCache.java      | 145 ++++++-----
 .../query/GridCacheDistributedQueryFuture.java  |   2 +-
 .../query/GridCacheDistributedQueryManager.java |  30 ++-
 .../continuous/CacheContinuousQueryManager.java |  39 +--
 .../cache/transactions/IgniteTxManager.java     |   2 +-
 .../cache/transactions/IgniteTxRemoteEx.java    |   2 +-
 .../dataload/IgniteDataLoaderImpl.java          |  25 +-
 .../datastructures/DataStructuresProcessor.java |   9 +-
 .../portable/os/GridOsPortableProcessor.java    |  11 +
 .../cache/GridCacheAbstractFullApiSelfTest.java |  12 +-
 .../cache/GridCacheAbstractMetricsSelfTest.java |   8 +-
 .../GridCacheConcurrentTxMultiNodeTest.java     |   8 +-
 .../cache/GridCacheEntryMemorySizeSelfTest.java |   2 +-
 .../cache/GridCacheEntryVersionSelfTest.java    |   4 +-
 .../GridCacheFinishPartitionsSelfTest.java      |   7 +-
 .../processors/cache/GridCacheLeakTest.java     |   2 +-
 .../cache/GridCacheMvccFlagsTest.java           |   8 +-
 .../cache/GridCacheMvccPartitionedSelfTest.java | 128 +++++-----
 .../processors/cache/GridCacheMvccSelfTest.java | 232 ++++++++---------
 .../cache/GridCacheObjectToStringSelfTest.java  |   2 +-
 .../cache/GridCacheOffHeapSelfTest.java         |   6 +-
 .../cache/GridCacheStoreValueBytesSelfTest.java |   4 +-
 .../processors/cache/GridCacheTestEntryEx.java  | 250 +++++++++++--------
 .../cache/GridCacheVersionMultinodeTest.java    |   2 +-
 .../IgniteCacheContainsKeyAbstractSelfTest.java |   4 +-
 .../cache/IgnitePutAllLargeBatchSelfTest.java   |   6 +-
 ...tAllUpdateNonPreloadedPartitionSelfTest.java |   6 +-
 .../IgniteTxConcurrentGetAbstractTest.java      |   4 +-
 .../cache/IgniteTxMultiNodeAbstractTest.java    |   4 +-
 .../GridCacheQueueCleanupSelfTest.java          |   2 +-
 .../GridCacheSetAbstractSelfTest.java           |   4 +-
 .../GridCacheSetFailoverAbstractSelfTest.java   |   4 +-
 .../IgnitePartitionedSetNoBackupsSelfTest.java  |   2 +-
 .../GridCacheAbstractJobExecutionTest.java      |   2 +-
 .../dht/GridCacheAtomicNearCacheSelfTest.java   |   4 +-
 .../dht/GridCacheColocatedDebugTest.java        |   6 +-
 .../dht/GridCacheDhtEntrySelfTest.java          |  12 +-
 ...GridCacheDhtEvictionNearReadersSelfTest.java |  12 +-
 .../dht/GridCacheDhtEvictionSelfTest.java       |  20 +-
 .../dht/GridCacheDhtInternalEntrySelfTest.java  |   4 +-
 .../dht/GridCacheDhtPreloadSelfTest.java        |   4 +-
 .../GridCacheDhtPreloadStartStopSelfTest.java   |   2 +-
 .../distributed/dht/GridCacheDhtTestUtils.java  |  19 +-
 ...ridCachePartitionedUnloadEventsSelfTest.java |   6 +-
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   2 +-
 .../atomic/GridCacheAtomicPreloadSelfTest.java  |   2 +-
 .../near/GridCacheNearMultiNodeSelfTest.java    |  12 +-
 .../near/GridCacheNearOneNodeSelfTest.java      |   2 +-
 ...idCacheNearOnlyMultiNodeFullApiSelfTest.java |  12 +-
 .../near/GridCacheNearReadersSelfTest.java      |  21 +-
 ...achePartitionedMultiNodeCounterSelfTest.java |  14 +-
 .../GridCacheReplicatedPreloadSelfTest.java     |   4 +-
 .../IgniteCacheExpiryPolicyAbstractTest.java    |   4 +-
 ...eCacheExpiryPolicyWithStoreAbstractTest.java |   2 +-
 .../GridDataLoaderProcessorSelfTest.java        |   2 +-
 .../igfs/IgfsDataManagerSelfTest.java           |   6 +-
 .../loadtests/hashmap/GridCacheTestContext.java |  12 +-
 .../processors/query/h2/IgniteH2Indexing.java   |   5 +-
 .../cache/GridCacheOffHeapAndSwapSelfTest.java  |   8 +-
 .../processors/cache/GridCacheSwapSelfTest.java |   7 +-
 137 files changed, 2391 insertions(+), 2026 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java
index 99453f5..b15f0ad 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java
@@ -758,19 +758,19 @@ public abstract class ClientAbstractMultiNodeSelfTest extends GridCommonAbstract
 
             GridCacheContext<Object, Object> cacheCtx = g.internalCache(REPLICATED_ASYNC_CACHE_NAME).context();
 
-            IgniteTxManager<Object, Object> tm = cacheCtx.tm();
+            IgniteTxManager tm = cacheCtx.tm();
 
             GridCacheVersion v = ((GridCacheVersionable)o).version();
 
             IgniteInternalTx t = tm.tx(v);
 
-            if (t.hasWriteKey(cacheCtx.txKey("x1")))
+            if (t.hasWriteKey(cacheCtx.txKey(cacheCtx.toCacheKeyObject("x1"))))
                 assertFalse("Invalid tx flags: " + t, t.syncCommit());
-            else if (t.hasWriteKey(cacheCtx.txKey("x2")))
-                assertTrue("Invalid tx flags: " + t, t.syncCommit());
-            else if (t.hasWriteKey(cacheCtx.txKey("x3")))
+            else if (t.hasWriteKey(cacheCtx.txKey(cacheCtx.toCacheKeyObject("x2"))))
+            assertTrue("Invalid tx flags: " + t, t.syncCommit());
+            else if (t.hasWriteKey(cacheCtx.txKey(cacheCtx.toCacheKeyObject("x3"))))
                 assertFalse("Invalid tx flags: " + t, t.syncCommit());
-            else if (t.hasWriteKey(cacheCtx.txKey("x4")))
+            else if (t.hasWriteKey(cacheCtx.txKey(cacheCtx.toCacheKeyObject("x4"))))
                 assertTrue("Invalid tx flags: " + t, t.syncCommit());
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
index 30ea854..7e597ce 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
@@ -528,9 +528,9 @@ public abstract class GridManagerAdapter<T extends IgniteSpi> implements GridMan
                             if (cctx.isNear())
                                 cctx = cctx.near().dht().context();
 
-                            GridCacheSwapEntry e = cctx.swap().read(key, true, true);
+                            GridCacheSwapEntry e = cctx.swap().read(cctx.toCacheKeyObject(key), true, true);
 
-                            return e != null ? (V)e.value() : null;
+                            return e != null ? CU.<V>value(e.value(), cctx) : null;
                         }
                         catch (IgniteCheckedException e) {
                             throw U.convertException(e);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectImpl.java
new file mode 100644
index 0000000..b0ffeda
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectImpl.java
@@ -0,0 +1,46 @@
+/*
+ * 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.jetbrains.annotations.*;
+
+/**
+ *
+ */
+public class CacheObjectImpl implements CacheObject {
+    /** */
+    private Object val;
+
+    /**
+     * @param val Value.
+     */
+    CacheObjectImpl(Object val) {
+        this.val = val;
+    }
+
+    /** {@inheritDoc} */
+    @Nullable @Override public <T> T getField(String name) {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
+    @Nullable @Override public <T> T value(GridCacheContext ctx) {
+        return (T)val;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/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 b74587f..2e2904b 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
@@ -1186,6 +1186,25 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
     }
 
     /**
+     *
+     * @param key Entry key.
+     * @return Entry or <tt>null</tt>.
+     */
+    // TODO IGNITE-51 (added for tests).
+    @Nullable public GridCacheEntryEx peekEx(Object key) {
+        return entry0(ctx.toCacheKeyObject(key), ctx.affinity().affinityTopologyVersion(), false, false);
+    }
+
+    /**
+     * @param key Entry key.
+     * @return Entry (never {@code null}).
+     */
+    // TODO IGNITE-51 (added for tests).
+    public GridCacheEntryEx entryEx(Object key) {
+        return entryEx(ctx.toCacheKeyObject(key), false);
+    }
+
+    /**
      * @param key Entry key.
      * @return Entry (never {@code null}).
      */
@@ -1650,7 +1669,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
      * @param vis Visitor.
      * @return Future.
      */
-    public IgniteInternalFuture<Object> readThroughAllAsync(final Collection<? extends KeyCacheObject> keys,
+    public IgniteInternalFuture<Object> readThroughAllAsync(final Collection<KeyCacheObject> keys,
         boolean reload,
         boolean skipVals,
         @Nullable final IgniteInternalTx tx,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
index b7d7251..b4712c7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
@@ -344,7 +344,7 @@ public class GridCacheAffinityManager<K, V> extends GridCacheManagerAdapter<K, V
      * @param topVer Topology version.
      * @return {@code true} if given key belongs to specified node.
      */
-    public boolean belongs(ClusterNode node, K key, long topVer) {
+    public boolean belongs(ClusterNode node, Object key, long topVer) {
         assert node != null;
 
         return belongs(node, partition(key), topVer);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
index 8dca8d3..92f538a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
@@ -36,7 +36,7 @@ public interface GridCacheAtomicFuture<R> extends GridCacheFuture<R> {
     /**
      * @return Future keys.
      */
-    public Collection<Object> keys();
+    public Collection<?> keys();
 
     /**
      * Checks if timeout occurred.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllRunnable.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllRunnable.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllRunnable.java
index fe7eff3..6b288b5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllRunnable.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllRunnable.java
@@ -80,11 +80,11 @@ public class GridCacheClearAllRunnable<K, V> implements Runnable {
         if (!ctx.isNear()) {
             if (ctx.swap().offHeapEnabled()) {
                 if (ctx.config().isQueryIndexEnabled()) {
-                    for (Iterator<Map.Entry<K, V>> it = ctx.swap().lazyOffHeapIterator(); it.hasNext();) {
-                        Map.Entry<K, V> e = it.next();
+                    for (Iterator<KeyCacheObject> it = ctx.swap().offHeapKeyIterator(true, true, -1L); it.hasNext();) {
+                        KeyCacheObject key = it.next();
 
-                        if (owns(e.getKey()))
-                            clearEntry(cache.entryEx(e.getKey()));
+                        if (owns(key))
+                            clearEntry(cache.entryEx(key));
 
                     }
                 }
@@ -95,10 +95,10 @@ public class GridCacheClearAllRunnable<K, V> implements Runnable {
             if (ctx.isSwapOrOffheapEnabled()) {
                 if (ctx.swap().swapEnabled()) {
                     if (ctx.config().isQueryIndexEnabled()) {
-                        Iterator<Map.Entry<K, V>> it = null;
+                        Iterator<KeyCacheObject> it = null;
 
                         try {
-                            it = ctx.swap().lazySwapIterator();
+                            it = ctx.swap().swapKeyIterator(true, true, -1L);
                         }
                         catch (IgniteCheckedException e) {
                             U.error(log, "Failed to get iterator over swap.", e);
@@ -106,10 +106,10 @@ public class GridCacheClearAllRunnable<K, V> implements Runnable {
 
                         if (it != null) {
                             while (it.hasNext()) {
-                                Map.Entry<K, V> e = it.next();
+                                KeyCacheObject key = it.next();
 
-                                if (owns(e.getKey()))
-                                    clearEntry(cache.entryEx(e.getKey()));
+                                if (owns(key))
+                                    clearEntry(cache.entryEx(key));
                             }
                         }
                     }
@@ -146,10 +146,10 @@ public class GridCacheClearAllRunnable<K, V> implements Runnable {
      * @param key Key.
      * @return {@code True} in case this worker should process this key.
      */
-    protected boolean owns(K key) {
+    protected boolean owns(KeyCacheObject key) {
         assert key != null;
 
-        // Avoid hash code and remainder calculation in case ther is no actual split.
+        // Avoid hash code and remainder calculation in case there is no actual split.
         return totalCnt == 1 || key.hashCode() % totalCnt == id;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
index b6c0190..63929d8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
@@ -917,7 +917,7 @@ public class GridCacheContext<K, V> implements Externalizable {
     /**
      * @return Cache communication manager.
      */
-    public GridCacheIoManager<K, V> io() {
+    public GridCacheIoManager io() {
         return sharedCtx.io();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
index ad133d3..f04ef90 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
@@ -253,14 +253,15 @@ public class GridCacheDeploymentManager<K, V> extends GridCacheSharedManagerAdap
                  * @return {@code True} if entry should be undeployed.
                  */
                 private boolean undeploy(Cache.Entry<K, V> e, GridCacheAdapter<K, V> cache) {
+                    // TODO IGNITE-51.
                     K k = e.getKey();
 
-                    GridCacheEntryEx entry = cache.peekEx(e.getKey());
+                    GridCacheEntryEx entry = cache.peekEx(cacheCtx.toCacheKeyObject(e.getKey()));
 
                     if (entry == null)
                         return false;
 
-                    V v;
+                    CacheObject v;
 
                     try {
                         v = entry.peek(GridCachePeekMode.GLOBAL, CU.<K, V>empty());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
index f3a72db..96b6402 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
@@ -499,7 +499,7 @@ public class GridCacheEvictionManager<K, V> extends GridCacheManagerAdapter<K, V
 
         if (!cctx.isNear()) {
             try {
-                GridDhtLocalPartition<K, V> part = cctx.dht().topology().localPartition(p, -1, false);
+                GridDhtLocalPartition part = cctx.dht().topology().localPartition(p, -1, false);
 
                 assert part != null;
 
@@ -526,7 +526,7 @@ public class GridCacheEvictionManager<K, V> extends GridCacheManagerAdapter<K, V
 
         if (!cctx.isNear()) {
             try {
-                GridDhtLocalPartition<K, V> part = cctx.dht().topology().localPartition(p, -1, false);
+                GridDhtLocalPartition part = cctx.dht().topology().localPartition(p, -1, false);
 
                 if (part != null && part.reserve()) {
                     part.lock();
@@ -562,7 +562,7 @@ public class GridCacheEvictionManager<K, V> extends GridCacheManagerAdapter<K, V
 
         if (!cctx.isNear()) {
             try {
-                GridDhtLocalPartition<K, V> part = cctx.dht().topology().localPartition(p, -1, false);
+                GridDhtLocalPartition part = cctx.dht().topology().localPartition(p, -1, false);
 
                 if (part != null) {
                     part.unlock();
@@ -1434,7 +1434,7 @@ public class GridCacheEvictionManager<K, V> extends GridCacheManagerAdapter<K, V
                     if (!evts.isEmpty())
                         continue;
 
-                    for (GridDhtLocalPartition<K, V> part : cctx.topology().localPartitions()) {
+                    for (GridDhtLocalPartition part : cctx.topology().localPartitions()) {
                         if (!evts.isEmpty())
                             break;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
index 8cd7c4b..0d5be6f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
@@ -40,7 +40,7 @@ import static org.apache.ignite.internal.GridTopic.*;
 /**
  * Cache communication manager.
  */
-public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V> {
+public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
     /** Message ID generator. */
     private static final AtomicLong idGen = new AtomicLong();
 
@@ -54,11 +54,11 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
     private Map<Integer, IgniteBiInClosure[]> idxClsHandlers = new HashMap<>();
 
     /** Handler registry. */
-    private ConcurrentMap<ListenerKey, IgniteBiInClosure<UUID, GridCacheMessage<K, V>>>
+    private ConcurrentMap<ListenerKey, IgniteBiInClosure<UUID, GridCacheMessage>>
         clsHandlers = new ConcurrentHashMap8<>();
 
     /** Ordered handler registry. */
-    private ConcurrentMap<Object, IgniteBiInClosure<UUID, ? extends GridCacheMessage<K, V>>> orderedHandlers =
+    private ConcurrentMap<Object, IgniteBiInClosure<UUID, ? extends GridCacheMessage>> orderedHandlers =
         new ConcurrentHashMap8<>();
 
     /** Stopping flag. */
@@ -81,11 +81,11 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
                 log.debug("Received unordered cache communication message [nodeId=" + nodeId +
                     ", locId=" + cctx.localNodeId() + ", msg=" + msg + ']');
 
-            final GridCacheMessage<K, V> cacheMsg = (GridCacheMessage<K, V>)msg;
+            final GridCacheMessage cacheMsg = (GridCacheMessage)msg;
 
             int msgIdx = cacheMsg.lookupIndex();
 
-            IgniteBiInClosure<UUID, GridCacheMessage<K, V>> c = null;
+            IgniteBiInClosure<UUID, GridCacheMessage> c = null;
 
             if (msgIdx >= 0) {
                 IgniteBiInClosure[] cacheClsHandlers = idxClsHandlers.get(cacheMsg.cacheId());
@@ -116,7 +116,7 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
                 IgniteInternalFuture<Long> topFut = cctx.discovery().topologyFuture(rmtTopVer);
 
                 if (!topFut.isDone()) {
-                    final IgniteBiInClosure<UUID, GridCacheMessage<K, V>> c0 = c;
+                    final IgniteBiInClosure<UUID, GridCacheMessage> c0 = c;
 
                     topFut.listenAsync(new CI1<IgniteInternalFuture<Long>>() {
                         @Override public void apply(IgniteInternalFuture<Long> t) {
@@ -184,8 +184,8 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
      * @param c Handler closure.
      */
     @SuppressWarnings({"unchecked", "ConstantConditions", "ThrowableResultOfMethodCallIgnored"})
-    private void onMessage0(final UUID nodeId, final GridCacheMessage<K, V> cacheMsg,
-        final IgniteBiInClosure<UUID, GridCacheMessage<K, V>> c) {
+    private void onMessage0(final UUID nodeId, final GridCacheMessage cacheMsg,
+        final IgniteBiInClosure<UUID, GridCacheMessage> c) {
         rw.readLock();
 
         try {
@@ -271,7 +271,7 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
      * @param cacheMsg Cache message to get start future.
      * @return Preloader start future.
      */
-    private IgniteInternalFuture<Object> startFuture(GridCacheMessage<K, V> cacheMsg) {
+    private IgniteInternalFuture<Object> startFuture(GridCacheMessage cacheMsg) {
         int cacheId = cacheMsg.cacheId();
 
         return cacheId != 0 ? cctx.cacheContext(cacheId).preloader().startFuture() : cctx.preloadersStartFuture();
@@ -282,8 +282,8 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
      * @param msg Message.
      * @param c Closure.
      */
-    private void processMessage(UUID nodeId, GridCacheMessage<K, V> msg,
-        IgniteBiInClosure<UUID, GridCacheMessage<K, V>> c) {
+    private void processMessage(UUID nodeId, GridCacheMessage msg,
+        IgniteBiInClosure<UUID, GridCacheMessage> c) {
         try {
             // Start clean.
             if (msg.transactional())
@@ -316,7 +316,7 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
      * @param destNodeId Destination node ID.
      * @throws IgniteCheckedException If failed.
      */
-    private void onSend(GridCacheMessage<K, V> msg, @Nullable UUID destNodeId) throws IgniteCheckedException {
+    private void onSend(GridCacheMessage msg, @Nullable UUID destNodeId) throws IgniteCheckedException {
         if (msg.messageId() < 0)
             // Generate and set message ID.
             msg.messageId(idGen.incrementAndGet());
@@ -338,7 +338,7 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
      * @throws ClusterTopologyCheckedException If receiver left.
      */
     @SuppressWarnings("unchecked")
-    public void send(ClusterNode node, GridCacheMessage<K, V> msg, GridIoPolicy plc) throws IgniteCheckedException {
+    public void send(ClusterNode node, GridCacheMessage msg, GridIoPolicy plc) throws IgniteCheckedException {
         assert !node.isLocal();
 
         onSend(msg, node.id());
@@ -385,7 +385,7 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
      * @throws IgniteCheckedException If send failed.
      */
     @SuppressWarnings({"BusyWait", "unchecked"})
-    public boolean safeSend(Collection<? extends ClusterNode> nodes, GridCacheMessage<K, V> msg, GridIoPolicy plc,
+    public boolean safeSend(Collection<? extends ClusterNode> nodes, GridCacheMessage msg, GridIoPolicy plc,
         @Nullable IgnitePredicate<ClusterNode> fallback) throws IgniteCheckedException {
         assert nodes != null;
         assert msg != null;
@@ -496,7 +496,7 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
      * @param msg Message to send.
      * @throws IgniteCheckedException If sending failed.
      */
-    public void send(UUID nodeId, GridCacheMessage<K, V> msg, GridIoPolicy plc) throws IgniteCheckedException {
+    public void send(UUID nodeId, GridCacheMessage msg, GridIoPolicy plc) throws IgniteCheckedException {
         ClusterNode n = cctx.discovery().node(nodeId);
 
         if (n == null)
@@ -514,7 +514,7 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
      * @param timeout Timeout to keep a message on receiving queue.
      * @throws IgniteCheckedException Thrown in case of any errors.
      */
-    public void sendOrderedMessage(ClusterNode node, Object topic, GridCacheMessage<K, V> msg, GridIoPolicy plc,
+    public void sendOrderedMessage(ClusterNode node, Object topic, GridCacheMessage msg, GridIoPolicy plc,
         long timeout) throws IgniteCheckedException {
         onSend(msg, node.id());
 
@@ -564,7 +564,7 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
     public void addHandler(
         int cacheId,
         Class<? extends GridCacheMessage> type,
-        IgniteBiInClosure<UUID, ? extends GridCacheMessage<K, V>> c) {
+        IgniteBiInClosure<UUID, ? extends GridCacheMessage> c) {
         int msgIdx = messageIndex(type);
 
         if (msgIdx != -1) {
@@ -588,7 +588,7 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
             ListenerKey key = new ListenerKey(cacheId, type);
 
             if (clsHandlers.putIfAbsent(key,
-                (IgniteBiInClosure<UUID, GridCacheMessage<K, V>>)c) != null)
+                (IgniteBiInClosure<UUID, GridCacheMessage>)c) != null)
                 assert false : "Handler for class already registered [cacheId=" + cacheId + ", cls=" + type +
                     ", old=" + clsHandlers.get(key) + ", new=" + c + ']';
         }
@@ -630,10 +630,10 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
      * @param c Handler.
      */
     @SuppressWarnings({"unchecked"})
-    public void addOrderedHandler(Object topic, IgniteBiInClosure<UUID, ? extends GridCacheMessage<K, V>> c) {
+    public void addOrderedHandler(Object topic, IgniteBiInClosure<UUID, ? extends GridCacheMessage> c) {
         if (orderedHandlers.putIfAbsent(topic, c) == null) {
             cctx.gridIO().addMessageListener(topic, new OrderedMessageListener(
-                (IgniteBiInClosure<UUID, GridCacheMessage<K, V>>)c));
+                (IgniteBiInClosure<UUID, GridCacheMessage>)c));
 
             if (log != null && log.isDebugEnabled())
                 log.debug("Registered ordered cache communication handler [topic=" + topic + ", handler=" + c + ']');
@@ -666,7 +666,7 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
      * @throws IgniteCheckedException If failed.
      */
     @SuppressWarnings({"ErrorNotRethrown", "unchecked"})
-    private void unmarshall(UUID nodeId, GridCacheMessage<K, V> cacheMsg) throws IgniteCheckedException {
+    private void unmarshall(UUID nodeId, GridCacheMessage cacheMsg) throws IgniteCheckedException {
         if (cctx.localNodeId().equals(nodeId))
             return;
 
@@ -715,12 +715,12 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
      */
     private class OrderedMessageListener implements GridMessageListener {
         /** */
-        private final IgniteBiInClosure<UUID, GridCacheMessage<K, V>> c;
+        private final IgniteBiInClosure<UUID, GridCacheMessage> c;
 
         /**
          * @param c Handler closure.
          */
-        OrderedMessageListener(IgniteBiInClosure<UUID, GridCacheMessage<K, V>> c) {
+        OrderedMessageListener(IgniteBiInClosure<UUID, GridCacheMessage> c) {
             this.c = c;
         }
 
@@ -730,7 +730,7 @@ public class GridCacheIoManager<K, V> extends GridCacheSharedManagerAdapter<K, V
             if (log.isDebugEnabled())
                 log.debug("Received cache ordered message [nodeId=" + nodeId + ", msg=" + msg + ']');
 
-            final GridCacheMessage<K, V> cacheMsg = (GridCacheMessage<K, V>)msg;
+            final GridCacheMessage cacheMsg = (GridCacheMessage)msg;
 
             onMessage0(nodeId, cacheMsg, c);
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
index 8b5d22d..a920d07 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
@@ -282,7 +282,7 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
                 ((GridFutureAdapter)future).onDone(e);
         }
 
-        for (GridCacheAtomicFuture<?, ?> future : atomicFuts.values())
+        for (GridCacheAtomicFuture<?> future : atomicFuts.values())
             ((GridFutureAdapter)future).onDone(e);
     }
 
@@ -960,7 +960,7 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
 
         res.ignoreChildFailures(ClusterTopologyCheckedException.class, CachePartialUpdateCheckedException.class);
 
-        for (GridCacheAtomicFuture<KeyCacheObject, ?> fut : atomicFuts.values()) {
+        for (GridCacheAtomicFuture<?> fut : atomicFuts.values()) {
             if (fut.waitForPartitionExchange() && fut.topologyVersion() < topVer)
                 res.add((IgniteInternalFuture<Object>)fut);
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapSwapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapSwapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapSwapEntry.java
index db0b011..93879bd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapSwapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapSwapEntry.java
@@ -38,7 +38,7 @@ import sun.misc.*;
  *     <li>Key classloader UUID</li>
  * </ul>
  */
-public class GridCacheOffheapSwapEntry<V> implements GridCacheSwapEntry<V> {
+public class GridCacheOffheapSwapEntry implements GridCacheSwapEntry {
     /** */
     private static final Unsafe UNSAFE = GridUnsafe.unsafe();
 
@@ -52,7 +52,7 @@ public class GridCacheOffheapSwapEntry<V> implements GridCacheSwapEntry<V> {
     private final GridCacheVersion ver;
 
     /** */
-    private V val;
+    private CacheObject val;
 
     /** */
     private final boolean valIsByteArr;
@@ -143,12 +143,12 @@ public class GridCacheOffheapSwapEntry<V> implements GridCacheSwapEntry<V> {
     }
 
     /** {@inheritDoc} */
-    @Override public V value() {
+    @Override public CacheObject value() {
         return val;
     }
 
     /** {@inheritDoc} */
-    @Override public void value(V val) {
+    @Override public void value(CacheObject val) {
         this.val = val;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index d7b1914..b6eecd4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -167,22 +167,22 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
         cctx.gridEvents().addLocalEventListener(discoLsnr, EVT_NODE_JOINED, EVT_NODE_LEFT, EVT_NODE_FAILED);
 
         cctx.io().addHandler(0, GridDhtPartitionsSingleMessage.class,
-            new MessageHandler<GridDhtPartitionsSingleMessage<K, V>>() {
-                @Override public void onMessage(ClusterNode node, GridDhtPartitionsSingleMessage<K, V> msg) {
+            new MessageHandler<GridDhtPartitionsSingleMessage>() {
+                @Override public void onMessage(ClusterNode node, GridDhtPartitionsSingleMessage msg) {
                     processSinglePartitionUpdate(node, msg);
                 }
             });
 
         cctx.io().addHandler(0, GridDhtPartitionsFullMessage.class,
-            new MessageHandler<GridDhtPartitionsFullMessage<K, V>>() {
-                @Override public void onMessage(ClusterNode node, GridDhtPartitionsFullMessage<K, V> msg) {
+            new MessageHandler<GridDhtPartitionsFullMessage>() {
+                @Override public void onMessage(ClusterNode node, GridDhtPartitionsFullMessage msg) {
                     processFullPartitionUpdate(node, msg);
                 }
             });
 
         cctx.io().addHandler(0, GridDhtPartitionsSingleRequest.class,
-            new MessageHandler<GridDhtPartitionsSingleRequest<K, V>>() {
-                @Override public void onMessage(ClusterNode node, GridDhtPartitionsSingleRequest<K, V> msg) {
+            new MessageHandler<GridDhtPartitionsSingleRequest>() {
+                @Override public void onMessage(ClusterNode node, GridDhtPartitionsSingleRequest msg) {
                     processSinglePartitionRequest(node, msg);
                 }
             });
@@ -487,7 +487,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
      */
     private boolean sendAllPartitions(Collection<? extends ClusterNode> nodes)
         throws IgniteCheckedException {
-        GridDhtPartitionsFullMessage<K, V> m = new GridDhtPartitionsFullMessage<>(null, null, -1);
+        GridDhtPartitionsFullMessage m = new GridDhtPartitionsFullMessage(null, null, -1);
 
         for (GridCacheContext<K, V> cacheCtx : cctx.cacheContexts()) {
             if (!cacheCtx.isLocal())
@@ -513,7 +513,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
      */
     private boolean sendLocalPartitions(ClusterNode node, @Nullable GridDhtPartitionExchangeId id)
         throws IgniteCheckedException {
-        GridDhtPartitionsSingleMessage<K, V> m = new GridDhtPartitionsSingleMessage<>(id, cctx.versions().last());
+        GridDhtPartitionsSingleMessage m = new GridDhtPartitionsSingleMessage(id, cctx.versions().last());
 
         for (GridCacheContext<K, V> cacheCtx : cctx.cacheContexts()) {
             if (!cacheCtx.isLocal())
@@ -603,7 +603,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
      * @param node Node.
      * @param msg Message.
      */
-    private void processFullPartitionUpdate(ClusterNode node, GridDhtPartitionsFullMessage<K, V> msg) {
+    private void processFullPartitionUpdate(ClusterNode node, GridDhtPartitionsFullMessage msg) {
         if (!enterBusy())
             return;
 
@@ -639,7 +639,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
      * @param node Node ID.
      * @param msg Message.
      */
-    private void processSinglePartitionUpdate(ClusterNode node, GridDhtPartitionsSingleMessage<K, V> msg) {
+    private void processSinglePartitionUpdate(ClusterNode node, GridDhtPartitionsSingleMessage msg) {
         if (!enterBusy())
             return;
 
@@ -677,7 +677,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
      * @param node Node ID.
      * @param msg Message.
      */
-    private void processSinglePartitionRequest(ClusterNode node, GridDhtPartitionsSingleRequest<K, V> msg) {
+    private void processSinglePartitionRequest(ClusterNode node, GridDhtPartitionsSingleRequest msg) {
         if (!enterBusy())
             return;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/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 fc244ce..168886c 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
@@ -870,7 +870,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
 
     /** {@inheritDoc} */
     @Override public IgniteInternalFuture<V> putIfAbsentAsync(K key, V val) {
-        return putAsync(key, val, cctx.noPeekArray());
+        return putAsync(key, val, cctx.<K, V>noPeekArray());
     }
 
     /** {@inheritDoc} */
@@ -880,7 +880,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
 
     /** {@inheritDoc} */
     @Override public IgniteInternalFuture<Boolean> putxIfAbsentAsync(K key, V val) {
-        return putxAsync(key, val, cctx.noPeekArray());
+        return putxAsync(key, val, cctx.<K, V>noPeekArray());
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
index 2154d0f..44775ae 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
@@ -50,7 +50,7 @@ public class GridCacheSharedContext<K, V> {
     private List<GridCacheSharedManager<K, V>> mgrs = new LinkedList<>();
 
     /** Cache transaction manager. */
-    private IgniteTxManager<K, V> txMgr;
+    private IgniteTxManager txMgr;
 
     /** Partition exchange manager. */
     private GridCachePartitionExchangeManager<K, V> exchMgr;
@@ -59,10 +59,10 @@ public class GridCacheSharedContext<K, V> {
     private GridCacheVersionManager<K, V> verMgr;
 
     /** Lock manager. */
-    private GridCacheMvccManager<K, V> mvccMgr;
+    private GridCacheMvccManager mvccMgr;
 
     /** IO Manager. */
-    private GridCacheIoManager<K, V> ioMgr;
+    private GridCacheIoManager ioMgr;
 
     /** Deployment manager. */
     private GridCacheDeploymentManager<K, V> depMgr;
@@ -83,12 +83,12 @@ public class GridCacheSharedContext<K, V> {
      */
     public GridCacheSharedContext(
         GridKernalContext kernalCtx,
-        IgniteTxManager<K, V> txMgr,
+        IgniteTxManager txMgr,
         GridCacheVersionManager<K, V> verMgr,
-        GridCacheMvccManager<K, V> mvccMgr,
+        GridCacheMvccManager mvccMgr,
         GridCacheDeploymentManager<K, V> depMgr,
         GridCachePartitionExchangeManager<K, V> exchMgr,
-        GridCacheIoManager<K, V> ioMgr
+        GridCacheIoManager ioMgr
     ) {
         this.kernalCtx = kernalCtx;
         this.mvccMgr = add(mvccMgr);
@@ -240,7 +240,7 @@ public class GridCacheSharedContext<K, V> {
     /**
      * @return Cache transaction manager.
      */
-    public IgniteTxManager<K, V> tm() {
+    public IgniteTxManager tm() {
         return txMgr;
     }
 
@@ -261,14 +261,14 @@ public class GridCacheSharedContext<K, V> {
     /**
      * @return Lock manager.
      */
-    public GridCacheMvccManager<K, V> mvcc() {
+    public GridCacheMvccManager mvcc() {
         return mvccMgr;
     }
 
     /**
      * @return IO manager.
      */
-    public GridCacheIoManager<K, V> io() {
+    public GridCacheIoManager io() {
         return ioMgr;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
index 587ba5f..f73a77d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
@@ -697,7 +697,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
             assert ptr.get1() != null;
             assert ptr.get2() != null;
 
-            return new GridCacheOffheapSwapEntry<>(ptr.get1(), ptr.get2());
+            return new GridCacheOffheapSwapEntry(ptr.get1(), ptr.get2());
         }
 
         return readAndRemoveSwap(key, part, keyBytes);
@@ -1330,7 +1330,8 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
     /**
      * @return Iterator over off-heap keys.
      */
-    public Iterator<KeyCacheObject> swapKeyIterator(boolean primary, boolean backup, long topVer) {
+    public Iterator<KeyCacheObject> swapKeyIterator(boolean primary, boolean backup, long topVer)
+        throws IgniteCheckedException {
         // TODO IGNITE-51.
         return null;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManager.java
index a844a5b..335ac63 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManager.java
@@ -67,7 +67,7 @@ public class GridCacheTtlManager<K, V> extends GridCacheManagerAdapter<K, V> {
      *
      * @param entry Entry to add.
      */
-    public void addTrackedEntry(GridCacheMapEntry<K, V> entry) {
+    public void addTrackedEntry(GridCacheMapEntry entry) {
         EntryWrapper<K, V> wrapper = new EntryWrapper<>(entry);
 
         pendingEntries.add(wrapper);
@@ -83,7 +83,7 @@ public class GridCacheTtlManager<K, V> extends GridCacheManagerAdapter<K, V> {
     /**
      * @param entry Entry to remove.
      */
-    public void removeTrackedEntry(GridCacheMapEntry<K, V> entry) {
+    public void removeTrackedEntry(GridCacheMapEntry entry) {
         // Remove must be called while holding lock on entry before updating expire time.
         // No need to wake up waiting thread in this case.
         pendingEntries.remove(new EntryWrapper<>(entry));
@@ -168,12 +168,12 @@ public class GridCacheTtlManager<K, V> extends GridCacheManagerAdapter<K, V> {
         private final long expireTime;
 
         /** Entry. */
-        private final GridCacheMapEntry<K, V> entry;
+        private final GridCacheMapEntry entry;
 
         /**
          * @param entry Cache entry to create wrapper for.
          */
-        private EntryWrapper(GridCacheMapEntry<K, V> entry) {
+        private EntryWrapper(GridCacheMapEntry entry) {
             expireTime = entry.expireTimeUnlocked();
 
             assert expireTime != 0;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/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 6ff84bf..2dfc9ac 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
@@ -201,8 +201,8 @@ public class GridCacheUtils {
     };
 
     /** Transaction entry to key. */
-    private static final IgniteClosure entry2key = new C1<GridCacheEntryEx, Object>() {
-        @Override public Object apply(GridCacheEntryEx e) {
+    private static final IgniteClosure entry2key = new C1<GridCacheEntryEx, KeyCacheObject>() {
+        @Override public KeyCacheObject apply(GridCacheEntryEx e) {
             return e.key();
         }
 
@@ -304,23 +304,21 @@ public class GridCacheUtils {
     /**
      * @param err If {@code true}, then throw {@link GridCacheFilterFailedException},
      *      otherwise return {@code val} passed in.
-     * @param <T> Return type.
      * @return Always return {@code null}.
      * @throws GridCacheFilterFailedException If {@code err} flag is {@code true}.
      */
-    @Nullable public static <T> T failed(boolean err) throws GridCacheFilterFailedException {
-        return failed(err, (T)null);
+    @Nullable public static CacheObject failed(boolean err) throws GridCacheFilterFailedException {
+        return failed(err, null);
     }
 
     /**
      * @param err If {@code true}, then throw {@link GridCacheFilterFailedException},
      *      otherwise return {@code val} passed in.
      * @param val Value for which evaluation happened.
-     * @param <T> Return type.
      * @return Always return {@code val} passed in or throw exception.
      * @throws GridCacheFilterFailedException If {@code err} flag is {@code true}.
      */
-    @Nullable public static <T> T failed(boolean err, T val) throws GridCacheFilterFailedException {
+    @Nullable public static CacheObject failed(boolean err, CacheObject val) throws GridCacheFilterFailedException {
         if (err)
             throw new GridCacheFilterFailedException(val);
 
@@ -409,7 +407,7 @@ public class GridCacheUtils {
      * @return Partition to state transformer.
      */
     @SuppressWarnings({"unchecked"})
-    public static <K, V> IgniteClosure<GridDhtLocalPartition<K, V>, GridDhtPartitionState> part2state() {
+    public static <K, V> IgniteClosure<GridDhtLocalPartition, GridDhtPartitionState> part2state() {
         return PART2STATE;
     }
 
@@ -417,7 +415,7 @@ public class GridCacheUtils {
      * @return Not evicted partitions.
      */
     @SuppressWarnings( {"unchecked"})
-    public static <K, V> IgnitePredicate<GridDhtLocalPartition<K, V>> notEvicted() {
+    public static <K, V> IgnitePredicate<GridDhtLocalPartition> notEvicted() {
         return PART_NOT_EVICTED;
     }
 
@@ -793,8 +791,8 @@ public class GridCacheUtils {
      * @return Closure that converts entry to key.
      */
     @SuppressWarnings({"unchecked"})
-    public static <K, V> IgniteClosure<GridCacheEntryEx, K> entry2Key() {
-        return (IgniteClosure<GridCacheEntryEx, K>)entry2key;
+    public static IgniteClosure<GridCacheEntryEx, KeyCacheObject> entry2Key() {
+        return entry2key;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/KeyCacheObjectImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/KeyCacheObjectImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/KeyCacheObjectImpl.java
new file mode 100644
index 0000000..47622ff
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/KeyCacheObjectImpl.java
@@ -0,0 +1,50 @@
+/*
+ * 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.jetbrains.annotations.*;
+
+/**
+ *
+ */
+public class KeyCacheObjectImpl implements KeyCacheObject {
+    /** */
+    private Object val;
+
+    /**
+     * @param val Value.
+     */
+    public KeyCacheObjectImpl(Object val) {
+        this.val = val;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean internal() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    @Nullable @Override public <T> T value(GridCacheContext ctx) {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Nullable @Override public <T> T getField(String name) {
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxFuture.java
index 2d7acc1..1b96306 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxFuture.java
@@ -153,9 +153,10 @@ public class GridCacheOptimisticCheckPreparedTxFuture<K, V> extends GridCompound
 
                     add(fut);
 
-                    GridCacheOptimisticCheckPreparedTxRequest<K, V>
-                        req = new GridCacheOptimisticCheckPreparedTxRequest<>(tx,
-                        nodeTransactions(id), futureId(), fut.futureId());
+                    GridCacheOptimisticCheckPreparedTxRequest req = new GridCacheOptimisticCheckPreparedTxRequest(tx,
+                        nodeTransactions(id),
+                        futureId(),
+                        fut.futureId());
 
                     try {
                         cctx.io().send(id, req, tx.ioPolicy());
@@ -175,7 +176,7 @@ public class GridCacheOptimisticCheckPreparedTxFuture<K, V> extends GridCompound
 
                 add(fut);
 
-                GridCacheOptimisticCheckPreparedTxRequest<K, V> req = new GridCacheOptimisticCheckPreparedTxRequest<>(
+                GridCacheOptimisticCheckPreparedTxRequest req = new GridCacheOptimisticCheckPreparedTxRequest(
                     tx, nodeTransactions(nodeId), futureId(), fut.futureId());
 
                 try {
@@ -219,7 +220,7 @@ public class GridCacheOptimisticCheckPreparedTxFuture<K, V> extends GridCompound
      * @param nodeId Node ID.
      * @param res Response.
      */
-    public void onResult(UUID nodeId, GridCacheOptimisticCheckPreparedTxResponse<K, V> res) {
+    public void onResult(UUID nodeId, GridCacheOptimisticCheckPreparedTxResponse res) {
         if (!isDone()) {
             for (IgniteInternalFuture<Boolean> fut : pending()) {
                 if (isMini(fut)) {
@@ -379,7 +380,7 @@ public class GridCacheOptimisticCheckPreparedTxFuture<K, V> extends GridCompound
         /**
          * @param res Result callback.
          */
-        private void onResult(GridCacheOptimisticCheckPreparedTxResponse<K, V> res) {
+        private void onResult(GridCacheOptimisticCheckPreparedTxResponse res) {
             onDone(res.success());
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxMapping.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxMapping.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxMapping.java
index 45c6030..db89aef 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxMapping.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxMapping.java
@@ -33,7 +33,7 @@ import java.util.*;
 /**
  * Transaction node mapping.
  */
-public class GridDistributedTxMapping<K, V> implements Externalizable {
+public class GridDistributedTxMapping implements Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -181,14 +181,14 @@ public class GridDistributedTxMapping<K, V> implements Externalizable {
      * @return Reads.
      */
     public Collection<IgniteTxEntry> reads() {
-        return F.view(entries, CU.<K, V>reads());
+        return F.view(entries, CU.reads());
     }
 
     /**
      * @return Writes.
      */
     public Collection<IgniteTxEntry> writes() {
-        return F.view(entries, CU.<K, V>writes());
+        return F.view(entries, CU.writes());
     }
 
     /**
@@ -231,7 +231,7 @@ public class GridDistributedTxMapping<K, V> implements Externalizable {
         for (Iterator<IgniteTxEntry> it = c.iterator(); it.hasNext();) {
             IgniteTxEntry e = it.next();
 
-            GridCacheEntryEx<K,V> cached = e.cached();
+            GridCacheEntryEx cached = e.cached();
 
             if (U.containsIntArray(parts, cached.partition()))
                 it.remove();
@@ -241,7 +241,7 @@ public class GridDistributedTxMapping<K, V> implements Externalizable {
     /**
      * @param keys Keys to evict readers for.
      */
-    public void evictReaders(@Nullable Collection<IgniteTxKey<K>> keys) {
+    public void evictReaders(@Nullable Collection<IgniteTxKey> keys) {
         if (keys == null || keys.isEmpty())
             return;
 
@@ -254,7 +254,7 @@ public class GridDistributedTxMapping<K, V> implements Externalizable {
      * @param keys Keys to evict readers for.
      * @param entries Entries to check.
      */
-    private void evictReaders(Collection<IgniteTxKey<K>> keys, @Nullable Collection<IgniteTxEntry> entries) {
+    private void evictReaders(Collection<IgniteTxKey> keys, @Nullable Collection<IgniteTxEntry> entries) {
         if (entries == null || entries.isEmpty())
             return;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
index d7a58b7..3dc9e45 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
@@ -411,7 +411,7 @@ public class GridDistributedTxPrepareRequest extends GridDistributedBaseMessage
                 col.add((IgniteTxEntry)in.readObject());
         }
 
-        return col == null ? Collections.<IgniteTxEntry<K,V>>emptyList() : col;
+        return col == null ? Collections.<IgniteTxEntry>emptyList() : col;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
index 39c5a25..c1000ea 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
@@ -202,7 +202,7 @@ public class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
     }
 
     /** {@inheritDoc} */
-    @Override public GridTuple<CacheObject> peek(GridCacheContext<?, ?> cacheCtx,
+    @Override public <K, V> GridTuple<CacheObject> peek(GridCacheContext cacheCtx,
         boolean failFast,
         KeyCacheObject key,
         IgnitePredicate<Cache.Entry<K, V>>[] filter)
@@ -281,7 +281,7 @@ public class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
                     log.debug("Replacing obsolete entry in remote transaction [entry=" + entry + ", tx=" + this + ']');
 
                 // Replace the entry.
-                txEntry.cached(txEntry.context().cache().entryEx(txEntry.key()), txEntry.keyBytes());
+                txEntry.cached(txEntry.context().cache().entryEx(txEntry.key()), null);
             }
         }
     }
@@ -327,7 +327,7 @@ public class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
             IgniteTxEntry rmv = readMap.remove(e.txKey());
 
             if (rmv != null) {
-                e.cached(rmv.cached(), rmv.keyBytes());
+                e.cached(rmv.cached(), null);
 
                 writeMap.put(e.txKey(), e);
             }
@@ -343,7 +343,6 @@ public class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
             // Copy values.
             entry.value(e.value(), e.hasWriteValue(), e.hasReadValue());
             entry.entryProcessors(e.entryProcessors());
-            entry.valueBytes(e.valueBytes());
             entry.op(e.op());
             entry.ttl(e.ttl());
             entry.explicitVersion(e.explicitVersion());
@@ -360,7 +359,7 @@ public class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
     }
 
     /** {@inheritDoc} */
-    @Override public boolean hasWriteKey(IgniteTxKey<K> key) {
+    @Override public boolean hasWriteKey(IgniteTxKey key) {
         return writeMap.containsKey(key);
     }
 
@@ -371,12 +370,12 @@ public class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
     }
 
     /** {@inheritDoc} */
-    @Override public Set<IgniteTxKey<K>> readSet() {
+    @Override public Set<IgniteTxKey> readSet() {
         return readMap.keySet();
     }
 
     /** {@inheritDoc} */
-    @Override public Set<IgniteTxKey<K>> writeSet() {
+    @Override public Set<IgniteTxKey> writeSet() {
         return writeMap.keySet();
     }
 
@@ -457,7 +456,7 @@ public class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
                         if (log.isDebugEnabled())
                             log.debug("Got removed entry while committing (will retry): " + txEntry);
 
-                        txEntry.cached(txEntry.context().cache().entryEx(txEntry.key()), txEntry.keyBytes());
+                        txEntry.cached(txEntry.context().cache().entryEx(txEntry.key()), null);
                     }
                 }
             }
@@ -475,7 +474,7 @@ public class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
 
                     // Node that for near transactions we grab all entries.
                     for (IgniteTxEntry txEntry : (near() ? allEntries() : writeEntries())) {
-                        GridCacheContext<K, V> cacheCtx = txEntry.context();
+                        GridCacheContext cacheCtx = txEntry.context();
 
                         boolean replicate = cacheCtx.isDrEnabled();
 
@@ -493,7 +492,7 @@ public class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
                                         break;
                                     }
 
-                                    GridNearCacheEntry<K, V> nearCached = null;
+                                    GridNearCacheEntry nearCached = null;
 
                                     if (updateNearCache(cacheCtx, txEntry.key(), topVer))
                                         nearCached = cacheCtx.dht().near().peekExx(txEntry.key());
@@ -501,11 +500,11 @@ public class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
                                     if (!F.isEmpty(txEntry.entryProcessors()) || !F.isEmpty(txEntry.filters()))
                                         txEntry.cached().unswap(true, false);
 
-                                    GridTuple3<GridCacheOperation, V, byte[]> res = applyTransformClosures(txEntry,
-                                        false);
+                                    GridTuple3<GridCacheOperation, CacheObject, byte[]> res =
+                                        applyTransformClosures(txEntry, false);
 
                                     GridCacheOperation op = res.get1();
-                                    V val = res.get2();
+                                    CacheObject val = res.get2();
                                     byte[] valBytes = res.get3();
 
                                     GridCacheVersion explicitVer = txEntry.conflictVersion();
@@ -518,31 +517,32 @@ public class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
 
                                     boolean conflictNeedResolve = cacheCtx.conflictNeedResolve();
 
-                                    GridCacheVersionConflictContext<K, V> conflictCtx = null;
+                                    GridCacheVersionConflictContext conflictCtx = null;
 
                                     if (conflictNeedResolve) {
-                                        IgniteBiTuple<GridCacheOperation, GridCacheVersionConflictContext<K, V>>
-                                            drRes = conflictResolve(op, txEntry, val, valBytes, explicitVer, cached);
-
-                                        assert drRes != null;
-
-                                        conflictCtx = drRes.get2();
-
-                                        if (conflictCtx.isUseOld())
-                                            op = NOOP;
-                                        else if (conflictCtx.isUseNew()) {
-                                            txEntry.ttl(conflictCtx.ttl());
-                                            txEntry.conflictExpireTime(conflictCtx.expireTime());
-                                        }
-                                        else if (conflictCtx.isMerge()) {
-                                            op = drRes.get1();
-                                            val = conflictCtx.mergeValue();
-                                            valBytes = null;
-                                            explicitVer = writeVersion();
-
-                                            txEntry.ttl(conflictCtx.ttl());
-                                            txEntry.conflictExpireTime(conflictCtx.expireTime());
-                                        }
+// TODO IGNITE-51.
+//                                        IgniteBiTuple<GridCacheOperation, GridCacheVersionConflictContext>
+//                                            drRes = conflictResolve(op, txEntry, val, valBytes, explicitVer, cached);
+//
+//                                        assert drRes != null;
+//
+//                                        conflictCtx = drRes.get2();
+//
+//                                        if (conflictCtx.isUseOld())
+//                                            op = NOOP;
+//                                        else if (conflictCtx.isUseNew()) {
+//                                            txEntry.ttl(conflictCtx.ttl());
+//                                            txEntry.conflictExpireTime(conflictCtx.expireTime());
+//                                        }
+//                                        else if (conflictCtx.isMerge()) {
+//                                            op = drRes.get1();
+//                                            val = conflictCtx.mergeValue();
+//                                            valBytes = null;
+//                                            explicitVer = writeVersion();
+//
+//                                            txEntry.ttl(conflictCtx.ttl());
+//                                            txEntry.conflictExpireTime(conflictCtx.expireTime());
+//                                        }
                                     }
                                     else
                                         // Nullify explicit version so that innerSet/innerRemove will work as usual.
@@ -564,16 +564,17 @@ public class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
 
                                             // Keep near entry up to date.
                                             if (nearCached != null) {
-                                                V val0 = null;
+                                                CacheObject val0 = null;
                                                 byte[] valBytes0 = null;
 
                                                 GridCacheValueBytes valBytesTuple = cached.valueBytes();
 
                                                 if (!valBytesTuple.isNull()) {
-                                                    if (valBytesTuple.isPlain())
-                                                        val0 = (V)valBytesTuple.get();
-                                                    else
-                                                        valBytes0 = valBytesTuple.get();
+// TODO IGNITE-51.
+//                                                    if (valBytesTuple.isPlain())
+//                                                        val0 = (V)valBytesTuple.get();
+//                                                    else
+//                                                        valBytes0 = valBytesTuple.get();
                                                 }
                                                 else
                                                     val0 = cached.rawGet();
@@ -593,7 +594,7 @@ public class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
                                             nearCached.updateOrEvict(xidVer, null, null, 0, 0, nodeId);
                                     }
                                     else if (op == RELOAD) {
-                                        V reloaded = cached.innerReload();
+                                        CacheObject reloaded = cached.innerReload();
 
                                         if (nearCached != null) {
                                             nearCached.innerReload();
@@ -619,16 +620,17 @@ public class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
                                                 cached.updateTtl(null, txEntry.ttl());
 
                                             if (nearCached != null) {
-                                                V val0 = null;
+                                                CacheObject val0 = null;
                                                 byte[] valBytes0 = null;
 
                                                 GridCacheValueBytes valBytesTuple = cached.valueBytes();
 
                                                 if (!valBytesTuple.isNull()) {
-                                                    if (valBytesTuple.isPlain())
-                                                        val0 = (V) valBytesTuple.get();
-                                                    else
-                                                        valBytes0 = valBytesTuple.get();
+// TODO IGNITE-51.
+//                                                    if (valBytesTuple.isPlain())
+//                                                        val0 = (V)valBytesTuple.get();
+//                                                    else
+//                                                        valBytes0 = valBytesTuple.get();
                                                 }
                                                 else
                                                     val0 = cached.rawGet();
@@ -657,7 +659,7 @@ public class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
                                         log.debug("Attempting to commit a removed entry (will retry): " + txEntry);
 
                                     // Renew cached entry.
-                                    txEntry.cached(cacheCtx.cache().entryEx(txEntry.key()), txEntry.keyBytes());
+                                    txEntry.cached(cacheCtx.cache().entryEx(txEntry.key()), null);
                                 }
                             }
                         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
index 239efc3..3a080fa 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
@@ -254,7 +254,7 @@ public class GridClientPartitionTopology<K, V> implements GridDhtPartitionTopolo
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public GridDhtLocalPartition<K, V> localPartition(int p, long topVer, boolean create)
+    @Nullable @Override public GridDhtLocalPartition localPartition(int p, long topVer, boolean create)
         throws GridDhtInvalidPartitionException {
         if (!create)
             return null;
@@ -264,29 +264,29 @@ public class GridClientPartitionTopology<K, V> implements GridDhtPartitionTopolo
     }
 
     /** {@inheritDoc} */
-    @Override public GridDhtLocalPartition<K, V> localPartition(K key, boolean create) {
+    @Override public GridDhtLocalPartition localPartition(Object key, boolean create) {
         return localPartition(1, -1, create);
     }
 
     /** {@inheritDoc} */
-    @Override public List<GridDhtLocalPartition<K, V>> localPartitions() {
+    @Override public List<GridDhtLocalPartition> localPartitions() {
         return Collections.emptyList();
     }
 
     /** {@inheritDoc} */
-    @Override public Collection<GridDhtLocalPartition<K, V>> currentLocalPartitions() {
+    @Override public Collection<GridDhtLocalPartition> currentLocalPartitions() {
         return Collections.emptyList();
     }
 
     /** {@inheritDoc} */
-    @Override public GridDhtLocalPartition<K, V> onAdded(long topVer, GridDhtCacheEntry<K, V> e) {
+    @Override public GridDhtLocalPartition onAdded(long topVer, GridDhtCacheEntry e) {
         assert false : "Entry should not be added to client topology: " + e;
 
         return null;
     }
 
     /** {@inheritDoc} */
-    @Override public void onRemoved(GridDhtCacheEntry<K, V> e) {
+    @Override public void onRemoved(GridDhtCacheEntry e) {
         assert false : "Entry should not be removed from client topology: " + e;
     }
 
@@ -709,14 +709,14 @@ public class GridClientPartitionTopology<K, V> implements GridDhtPartitionTopolo
     }
 
     /** {@inheritDoc} */
-    @Override public boolean own(GridDhtLocalPartition<K, V> part) {
+    @Override public boolean own(GridDhtLocalPartition part) {
         assert false : "Client topology should never own a partition: " + part;
 
         return false;
     }
 
     /** {@inheritDoc} */
-    @Override public void onEvicted(GridDhtLocalPartition<K, V> part, boolean updateSeq) {
+    @Override public void onEvicted(GridDhtLocalPartition part, boolean updateSeq) {
         assert updateSeq || lock.isWriteLockedByCurrentThread();
 
         lock.writeLock().lock();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java
index 101d657..e4970e4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java
@@ -84,7 +84,7 @@ public class GridDhtAssignmentFetchFuture<K, V> extends GridFutureAdapter<List<L
      * @param node Node.
      * @param res Reponse.
      */
-    public void onResponse(ClusterNode node, GridDhtAffinityAssignmentResponse<K, V> res) {
+    public void onResponse(ClusterNode node, GridDhtAffinityAssignmentResponse res) {
         if (res.topologyVersion() != topVer) {
             if (log.isDebugEnabled())
                 log.debug("Received affinity assignment for wrong topolgy version (will ignore) " +
@@ -148,7 +148,7 @@ public class GridDhtAssignmentFetchFuture<K, V> extends GridFutureAdapter<List<L
                         log0.debug("Sending affinity fetch request to remote node [locNodeId=" + ctx.localNodeId() +
                             ", node=" + node + ']');
 
-                    ctx.io().send(node, new GridDhtAffinityAssignmentRequest<K, V>(ctx.cacheId(), topVer),
+                    ctx.io().send(node, new GridDhtAffinityAssignmentRequest(ctx.cacheId(), topVer),
                         AFFINITY_POOL);
 
                     // Close window for listener notification.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCache.java
index f1c96a1..800e5c9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCache.java
@@ -53,7 +53,7 @@ public class GridDhtCache<K, V> extends GridDhtTransactionalCacheAdapter<K, V> {
      * @param ctx Cache context.
      * @param map Cache map.
      */
-    public GridDhtCache(GridCacheContext<K, V> ctx, GridCacheConcurrentMap<K, V> map) {
+    public GridDhtCache(GridCacheContext<K, V> ctx, GridCacheConcurrentMap map) {
         super(ctx, map);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/760182ea/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 104b972..568566e 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
@@ -586,7 +586,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
      */
     public GridDhtFuture<Collection<GridCacheEntryInfo>> getDhtAsync(UUID reader,
         long msgId,
-        LinkedHashMap<? extends K, Boolean> keys,
+        LinkedHashMap<KeyCacheObject, Boolean> keys,
         boolean readThrough,
         boolean reload,
         long topVer,


Mime
View raw message