ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [35/50] [abbrv] incubator-ignite git commit: GG-9141 - Renaming.
Date Mon, 22 Dec 2014 10:42:37 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxMap.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxMap.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxMap.java
deleted file mode 100644
index 9cd1872..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxMap.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.kernal.processors.cache;
-
-import org.apache.ignite.lang.*;
-import org.gridgain.grid.util.*;
-import org.gridgain.grid.util.typedef.*;
-import org.jetbrains.annotations.*;
-
-import java.io.*;
-import java.util.*;
-
-/**
- * Grid cache transaction read or write set.
- */
-public class GridCacheTxMap<K, V> extends AbstractMap<GridCacheTxKey<K>, GridCacheTxEntry<K, V>> implements Externalizable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Base transaction map. */
-    private Map<GridCacheTxKey<K>, GridCacheTxEntry<K, V>> txMap;
-
-    /** Entry set. */
-    private Set<Entry<GridCacheTxKey<K>, GridCacheTxEntry<K, V>>> entrySet;
-
-    /** Cached size. */
-    private int size = -1;
-
-    /** Empty flag. */
-    private Boolean empty;
-
-    /** Sealed flag. */
-    private boolean sealed;
-
-    /** Filter. */
-    private IgnitePredicate<GridCacheTxEntry<K, V>> filter;
-
-    /**
-     * Empty constructor required for {@link Externalizable}.
-     */
-    public GridCacheTxMap() {
-        // No-op.
-    }
-
-    /**
-     * @param txMap Transaction map.
-     * @param filter Filter.
-     */
-    public GridCacheTxMap(Map<GridCacheTxKey<K>, GridCacheTxEntry<K, V>> txMap,
-        IgnitePredicate<GridCacheTxEntry<K, V>> filter) {
-        this.txMap = txMap;
-        this.filter = filter;
-    }
-
-    /**
-     * Seals this map.
-     *
-     * @return This map for chaining.
-     */
-    GridCacheTxMap<K, V> seal() {
-        sealed = true;
-
-        return this;
-    }
-
-    /**
-     * @return Sealed flag.
-     */
-    boolean sealed() {
-        return sealed;
-    }
-
-    /** {@inheritDoc} */
-    @Override public Set<Entry<GridCacheTxKey<K>, GridCacheTxEntry<K, V>>> entrySet() {
-        if (entrySet == null) {
-            entrySet = new GridSerializableSet<Entry<GridCacheTxKey<K>, GridCacheTxEntry<K, V>>>() {
-                private Set<Entry<GridCacheTxKey<K>, GridCacheTxEntry<K, V>>> set = txMap.entrySet();
-
-                @Override public Iterator<Entry<GridCacheTxKey<K>, GridCacheTxEntry<K, V>>> iterator() {
-                    return new GridSerializableIterator<Entry<GridCacheTxKey<K>, GridCacheTxEntry<K, V>>>() {
-                        private Iterator<Entry<GridCacheTxKey<K>, GridCacheTxEntry<K, V>>> it = set.iterator();
-
-                        private Entry<GridCacheTxKey<K>, GridCacheTxEntry<K, V>> cur;
-
-                        // Constructor.
-                        {
-                            advance();
-                        }
-
-                        @Override public boolean hasNext() {
-                            return cur != null;
-                        }
-
-                        @Override public Entry<GridCacheTxKey<K>, GridCacheTxEntry<K, V>> next() {
-                            if (cur == null)
-                                throw new NoSuchElementException();
-
-                            Entry<GridCacheTxKey<K>, GridCacheTxEntry<K, V>> e = cur;
-
-                            advance();
-
-                            return e;
-                        }
-
-                        @Override public void remove() {
-                            throw new UnsupportedOperationException();
-                        }
-
-                        private void advance() {
-                            cur = null;
-
-                            while (cur == null && it.hasNext()) {
-                                Entry<GridCacheTxKey<K>, GridCacheTxEntry<K, V>> e = it.next();
-
-                                if (filter.apply(e.getValue()))
-                                    cur = e;
-                            }
-                        }
-                    };
-                }
-
-                @Override public int size() {
-                    return !sealed ? F.size(iterator()) : size == -1 ? size = F.size(iterator()) : size;
-                }
-
-                @Override public boolean isEmpty() {
-                    return !sealed ? !iterator().hasNext() : empty == null ? empty = !iterator().hasNext() : empty;
-                }
-            };
-        }
-
-        return entrySet;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean isEmpty() {
-        return entrySet().isEmpty();
-    }
-
-    /** {@inheritDoc} */
-    @Override public int size() {
-        return entrySet().size();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean containsKey(Object key) {
-        return get(key) != null;
-    }
-
-    /** {@inheritDoc} */
-    @Nullable
-    @Override public GridCacheTxEntry<K, V> get(Object key) {
-        GridCacheTxEntry<K, V> e = txMap.get(key);
-
-        return e == null ? null : filter.apply(e) ? e : null;
-    }
-
-    /** {@inheritDoc} */
-    @Override public GridCacheTxEntry<K, V> remove(Object key) {
-        throw new UnsupportedOperationException();
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeExternal(ObjectOutput out) throws IOException {
-        throw new IllegalStateException("Transaction view map should never be serialized: " + this);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-        throw new IllegalStateException("Transaction view map should never be serialized: " + this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxRemoteEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxRemoteEx.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxRemoteEx.java
deleted file mode 100644
index deb4a78..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxRemoteEx.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.kernal.processors.cache;
-
-import java.util.*;
-
-/**
- * Local transaction API.
- */
-public interface GridCacheTxRemoteEx<K, V> extends GridCacheTxEx<K, V> {
-    /**
-     * @return Remote thread ID.
-     */
-    public long remoteThreadId();
-
-    /**
-     * @param baseVer Base version.
-     * @param committedVers Committed version.
-     * @param rolledbackVers Rolled back version.
-     * @param pendingVers Pending versions.
-     */
-    public void doneRemote(GridCacheVersion baseVer, Collection<GridCacheVersion> committedVers,
-        Collection<GridCacheVersion> rolledbackVers, Collection<GridCacheVersion> pendingVers);
-
-    /**
-     * @param e Sets write value for pessimistic transactions.
-     * @return {@code True} if entry was found.
-     */
-    public boolean setWriteValue(GridCacheTxEntry<K, V> e);
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheUtils.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheUtils.java
index e29da86..3ee6d87 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheUtils.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheUtils.java
@@ -18,6 +18,7 @@ import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.lang.*;
 import org.gridgain.grid.util.typedef.*;
@@ -105,7 +106,7 @@ public class GridCacheUtils {
     /** Read filter. */
     private static final IgnitePredicate READ_FILTER = new P1<Object>() {
         @Override public boolean apply(Object e) {
-            return ((GridCacheTxEntry)e).op() == READ;
+            return ((IgniteTxEntry)e).op() == READ;
         }
 
         @Override public String toString() {
@@ -116,7 +117,7 @@ public class GridCacheUtils {
     /** Write filter. */
     private static final IgnitePredicate WRITE_FILTER = new P1<Object>() {
         @Override public boolean apply(Object e) {
-            return ((GridCacheTxEntry)e).op() != READ;
+            return ((IgniteTxEntry)e).op() != READ;
         }
 
         @Override public String toString() {
@@ -125,15 +126,15 @@ public class GridCacheUtils {
     };
 
     /** Transfer required predicate. */
-    private static final IgnitePredicate TRANSFER_REQUIRED_PREDICATE = new P1<GridCacheTxEntry>() {
-        @Override public boolean apply(GridCacheTxEntry e) {
+    private static final IgnitePredicate TRANSFER_REQUIRED_PREDICATE = new P1<IgniteTxEntry>() {
+        @Override public boolean apply(IgniteTxEntry e) {
             return e.transferRequired();
         }
     };
 
     /** Transaction entry to key. */
-    private static final IgniteClosure tx2key = new C1<GridCacheTxEntry, Object>() {
-        @Override public Object apply(GridCacheTxEntry e) {
+    private static final IgniteClosure tx2key = new C1<IgniteTxEntry, Object>() {
+        @Override public Object apply(IgniteTxEntry e) {
             return e.key();
         }
 
@@ -143,9 +144,9 @@ public class GridCacheUtils {
     };
 
     /** Transaction entry to key. */
-    private static final IgniteClosure txCol2key = new C1<Collection<GridCacheTxEntry>, Collection<Object>>() {
+    private static final IgniteClosure txCol2key = new C1<Collection<IgniteTxEntry>, Collection<Object>>() {
         @SuppressWarnings( {"unchecked"})
-        @Override public Collection<Object> apply(Collection<GridCacheTxEntry> e) {
+        @Override public Collection<Object> apply(Collection<IgniteTxEntry> e) {
             return F.viewReadOnly(e, tx2key);
         }
 
@@ -166,8 +167,8 @@ public class GridCacheUtils {
     };
 
     /** Converts transaction to XID version. */
-    private static final IgniteClosure tx2xidVer = new C1<GridCacheTxEx, GridCacheVersion>() {
-        @Override public GridCacheVersion apply(GridCacheTxEx tx) {
+    private static final IgniteClosure tx2xidVer = new C1<IgniteTxEx, GridCacheVersion>() {
+        @Override public GridCacheVersion apply(IgniteTxEx tx) {
             return tx.xidVersion();
         }
 
@@ -177,15 +178,15 @@ public class GridCacheUtils {
     };
 
     /** Converts tx entry to entry. */
-    private static final IgniteClosure tx2entry = new C1<GridCacheTxEntry, GridCacheEntryEx>() {
-        @Override public GridCacheEntryEx apply(GridCacheTxEntry e) {
+    private static final IgniteClosure tx2entry = new C1<IgniteTxEntry, GridCacheEntryEx>() {
+        @Override public GridCacheEntryEx apply(IgniteTxEntry e) {
             return e.cached();
         }
     };
 
     /** Transaction entry to key bytes. */
-    private static final IgniteClosure tx2keyBytes = new C1<GridCacheTxEntry, byte[]>() {
-        @Nullable @Override public byte[] apply(GridCacheTxEntry e) {
+    private static final IgniteClosure tx2keyBytes = new C1<IgniteTxEntry, byte[]>() {
+        @Nullable @Override public byte[] apply(IgniteTxEntry e) {
             return e.keyBytes();
         }
 
@@ -757,40 +758,40 @@ public class GridCacheUtils {
      * @return Closure that converts tx entry to key.
      */
     @SuppressWarnings({"unchecked"})
-    public static <K, V> IgniteClosure<GridCacheTxEntry<K, V>, K> tx2key() {
-        return (IgniteClosure<GridCacheTxEntry<K, V>, K>)tx2key;
+    public static <K, V> IgniteClosure<IgniteTxEntry<K, V>, K> tx2key() {
+        return (IgniteClosure<IgniteTxEntry<K, V>, K>)tx2key;
     }
 
     /**
      * @return Closure that converts tx entry collection to key collection.
      */
     @SuppressWarnings({"unchecked"})
-    public static <K, V> IgniteClosure<Collection<GridCacheTxEntry<K, V>>, Collection<K>> txCol2Key() {
-        return (IgniteClosure<Collection<GridCacheTxEntry<K, V>>, Collection<K>>)txCol2key;
+    public static <K, V> IgniteClosure<Collection<IgniteTxEntry<K, V>>, Collection<K>> txCol2Key() {
+        return (IgniteClosure<Collection<IgniteTxEntry<K, V>>, Collection<K>>)txCol2key;
     }
 
     /**
      * @return Closure that converts tx entry to key.
      */
     @SuppressWarnings({"unchecked"})
-    public static <K, V> IgniteClosure<GridCacheTxEntry<K, V>, byte[]> tx2keyBytes() {
-        return (IgniteClosure<GridCacheTxEntry<K, V>, byte[]>)tx2keyBytes;
+    public static <K, V> IgniteClosure<IgniteTxEntry<K, V>, byte[]> tx2keyBytes() {
+        return (IgniteClosure<IgniteTxEntry<K, V>, byte[]>)tx2keyBytes;
     }
 
     /**
      * @return Converts transaction entry to cache entry.
      */
     @SuppressWarnings( {"unchecked"})
-    public static <K, V> IgniteClosure<GridCacheTxEntry<K, V>, GridCacheEntryEx<K, V>> tx2entry() {
-        return (IgniteClosure<GridCacheTxEntry<K, V>, GridCacheEntryEx<K, V>>)tx2entry;
+    public static <K, V> IgniteClosure<IgniteTxEntry<K, V>, GridCacheEntryEx<K, V>> tx2entry() {
+        return (IgniteClosure<IgniteTxEntry<K, V>, GridCacheEntryEx<K, V>>)tx2entry;
     }
 
     /**
      * @return Closure which converts transaction entry xid to XID version.
      */
     @SuppressWarnings( {"unchecked"})
-    public static <K, V> IgniteClosure<GridCacheTxEx<K, V>, GridCacheVersion> tx2xidVersion() {
-        return (IgniteClosure<GridCacheTxEx<K, V>, GridCacheVersion>)tx2xidVer;
+    public static <K, V> IgniteClosure<IgniteTxEx<K, V>, GridCacheVersion> tx2xidVersion() {
+        return (IgniteClosure<IgniteTxEx<K, V>, GridCacheVersion>)tx2xidVer;
     }
 
     /**
@@ -820,7 +821,7 @@ public class GridCacheUtils {
      * @return Filter for transaction reads.
      */
     @SuppressWarnings({"unchecked"})
-    public static <K, V> IgnitePredicate<GridCacheTxEntry<K, V>> reads() {
+    public static <K, V> IgnitePredicate<IgniteTxEntry<K, V>> reads() {
         return READ_FILTER;
     }
 
@@ -828,7 +829,7 @@ public class GridCacheUtils {
      * @return Filter for transaction writes.
      */
     @SuppressWarnings({"unchecked"})
-    public static <K, V> IgnitePredicate<GridCacheTxEntry<K, V>> writes() {
+    public static <K, V> IgnitePredicate<IgniteTxEntry<K, V>> writes() {
         return WRITE_FILTER;
     }
 
@@ -836,7 +837,7 @@ public class GridCacheUtils {
      * @return Transfer required predicate.
      */
     @SuppressWarnings("unchecked")
-    public static <K, V> IgnitePredicate<GridCacheTxEntry<K, V>> transferRequired() {
+    public static <K, V> IgnitePredicate<IgniteTxEntry<K, V>> transferRequired() {
         return TRANSFER_REQUIRED_PREDICATE;
     }
 
@@ -1628,7 +1629,7 @@ public class GridCacheUtils {
      * @param tx Transaction.
      * @return Subject ID.
      */
-    public static <K, V> UUID subjectId(GridCacheTxEx<K, V> tx, GridCacheSharedContext<K, V> ctx) {
+    public static <K, V> UUID subjectId(IgniteTxEx<K, V> tx, GridCacheSharedContext<K, V> ctx) {
         if (tx == null)
             return ctx.localNodeId();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheDataStructuresManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheDataStructuresManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheDataStructuresManager.java
index b121039..b4fc6d2 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheDataStructuresManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheDataStructuresManager.java
@@ -19,6 +19,7 @@ import org.gridgain.grid.cache.datastructures.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.grid.kernal.processors.cache.query.continuous.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.kernal.processors.task.*;
 import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.typedef.*;
@@ -915,7 +916,7 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
      *
      * @param tx Committed transaction.
      */
-    public void onTxCommitted(GridCacheTxEx<K, V> tx) {
+    public void onTxCommitted(IgniteTxEx<K, V> tx) {
         if (!cctx.isDht() && tx.internal() && (!cctx.isColocated() || cctx.isReplicated())) {
             try {
                 waitInitialization();
@@ -926,12 +927,12 @@ public final class GridCacheDataStructuresManager<K, V> extends GridCacheManager
                 return;
             }
 
-            Collection<GridCacheTxEntry<K, V>> entries = tx.writeEntries();
+            Collection<IgniteTxEntry<K, V>> entries = tx.writeEntries();
 
             if (log.isDebugEnabled())
                 log.debug("Committed entries: " + entries);
 
-            for (GridCacheTxEntry<K, V> entry : entries) {
+            for (IgniteTxEntry<K, V> entry : entries) {
                 // Check updated or created GridCacheInternalKey keys.
                 if ((entry.op() == CREATE || entry.op() == UPDATE) && entry.key() instanceof GridCacheInternalKey) {
                     GridCacheInternal key = (GridCacheInternal)entry.key();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheCommittedTxInfo.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheCommittedTxInfo.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheCommittedTxInfo.java
index ec71041..3691fe5 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheCommittedTxInfo.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheCommittedTxInfo.java
@@ -10,6 +10,7 @@
 package org.gridgain.grid.kernal.processors.cache.distributed;
 
 import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.gridgain.grid.util.tostring.*;
 
@@ -32,7 +33,7 @@ public class GridCacheCommittedTxInfo<K, V> implements Externalizable {
 
     /** Recovery writes, i.e. values that have never been sent to remote nodes. */
     @GridToStringInclude
-    private Collection<GridCacheTxEntry<K, V>> recoveryWrites;
+    private Collection<IgniteTxEntry<K, V>> recoveryWrites;
 
     /**
      * Empty constructor required by {@link Externalizable}.
@@ -44,7 +45,7 @@ public class GridCacheCommittedTxInfo<K, V> implements Externalizable {
     /**
      * @param tx Committed cache transaction.
      */
-    public GridCacheCommittedTxInfo(GridCacheTxEx<K, V> tx) {
+    public GridCacheCommittedTxInfo(IgniteTxEx<K, V> tx) {
         assert !tx.local() || !tx.replicated();
 
         originatingTxId = tx.nearXidVersion();
@@ -72,8 +73,8 @@ public class GridCacheCommittedTxInfo<K, V> implements Externalizable {
     /**
      * @return Collection of recovery writes.
      */
-    public Collection<GridCacheTxEntry<K, V>> recoveryWrites() {
-        return recoveryWrites == null ? Collections.<GridCacheTxEntry<K, V>>emptyList() : recoveryWrites;
+    public Collection<IgniteTxEntry<K, V>> recoveryWrites() {
+        return recoveryWrites == null ? Collections.<IgniteTxEntry<K, V>>emptyList() : recoveryWrites;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxFuture.java
index bedefa9..9232338 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxFuture.java
@@ -12,8 +12,8 @@ package org.gridgain.grid.kernal.processors.cache.distributed;
 import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.future.*;
 import org.gridgain.grid.util.typedef.internal.*;
@@ -45,7 +45,7 @@ public class GridCacheOptimisticCheckPreparedTxFuture<K, V> extends GridCompound
     private final IgniteUuid futId = IgniteUuid.randomUuid();
 
     /** Transaction. */
-    private final GridCacheTxEx<K, V> tx;
+    private final IgniteTxEx<K, V> tx;
 
     /** All involved nodes. */
     private final Map<UUID, ClusterNode> nodes;
@@ -66,7 +66,7 @@ public class GridCacheOptimisticCheckPreparedTxFuture<K, V> extends GridCompound
      * @param txNodes Transaction mapping.
      */
     @SuppressWarnings("ConstantConditions")
-    public GridCacheOptimisticCheckPreparedTxFuture(GridCacheSharedContext<K, V> cctx, GridCacheTxEx<K, V> tx,
+    public GridCacheOptimisticCheckPreparedTxFuture(GridCacheSharedContext<K, V> cctx, IgniteTxEx<K, V> tx,
         UUID failedNodeId, Map<UUID, Collection<UUID>> txNodes) {
         super(cctx.kernalContext(), CU.boolReducer());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java
index 693f1ff..014dba5 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java
@@ -11,6 +11,7 @@ package org.gridgain.grid.kernal.processors.cache.distributed;
 
 import org.apache.ignite.lang.*;
 import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.direct.*;
 import org.gridgain.grid.util.typedef.internal.*;
 
@@ -50,7 +51,7 @@ public class GridCacheOptimisticCheckPreparedTxRequest<K, V> extends GridDistrib
      * @param futId Future ID.
      * @param miniId Mini future ID.
      */
-    public GridCacheOptimisticCheckPreparedTxRequest(GridCacheTxEx<K, V> tx, int txNum, IgniteUuid futId, IgniteUuid miniId) {
+    public GridCacheOptimisticCheckPreparedTxRequest(IgniteTxEx<K, V> tx, int txNum, IgniteUuid futId, IgniteUuid miniId) {
         super(tx.xidVersion(), 0);
 
         nearXidVer = tx.nearXidVersion();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePerThreadTxCommitBuffer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePerThreadTxCommitBuffer.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePerThreadTxCommitBuffer.java
index c7284b3..7fcb6c9 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePerThreadTxCommitBuffer.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePerThreadTxCommitBuffer.java
@@ -11,6 +11,7 @@ package org.gridgain.grid.kernal.processors.cache.distributed;
 
 import org.apache.ignite.*;
 import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.kernal.processors.timeout.*;
 import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.typedef.internal.*;
@@ -48,7 +49,7 @@ public class GridCachePerThreadTxCommitBuffer<K, V> implements GridCacheTxCommit
     }
 
     /** {@inheritDoc} */
-    @Override public void addCommittedTx(GridCacheTxEx<K, V> tx) {
+    @Override public void addCommittedTx(IgniteTxEx<K, V> tx) {
         long threadId = tx.threadId();
 
         StoreKey key = new StoreKey(tx.eventNodeId(), threadId);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxFuture.java
index 1e31fdf..201289c 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxFuture.java
@@ -14,6 +14,7 @@ import org.apache.ignite.cluster.*;
 import org.apache.ignite.lang.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.future.*;
 import org.gridgain.grid.util.typedef.internal.*;
@@ -42,7 +43,7 @@ public class GridCachePessimisticCheckCommittedTxFuture<K, V> extends GridCompou
     private final IgniteUuid futId = IgniteUuid.randomUuid();
 
     /** Transaction. */
-    private final GridCacheTxEx<K, V> tx;
+    private final IgniteTxEx<K, V> tx;
 
     /** All involved nodes. */
     private final Map<UUID, ClusterNode> nodes;
@@ -59,7 +60,7 @@ public class GridCachePessimisticCheckCommittedTxFuture<K, V> extends GridCompou
      * @param failedNodeId ID of failed node started transaction.
      */
     @SuppressWarnings("ConstantConditions")
-    public GridCachePessimisticCheckCommittedTxFuture(GridCacheSharedContext<K, V> cctx, GridCacheTxEx<K, V> tx,
+    public GridCachePessimisticCheckCommittedTxFuture(GridCacheSharedContext<K, V> cctx, IgniteTxEx<K, V> tx,
         UUID failedNodeId) {
         super(cctx.kernalContext(), new SingleReducer<K, V>());
 
@@ -83,8 +84,8 @@ public class GridCachePessimisticCheckCommittedTxFuture<K, V> extends GridCompou
         // Check local node first (local node can be a backup node for some part of this transaction).
         long originatingThreadId = tx.threadId();
 
-        if (tx instanceof GridCacheTxRemoteEx)
-            originatingThreadId = ((GridCacheTxRemoteEx)tx).remoteThreadId();
+        if (tx instanceof IgniteTxRemoteEx)
+            originatingThreadId = ((IgniteTxRemoteEx)tx).remoteThreadId();
 
         GridCacheCommittedTxInfo<K, V> txInfo = cctx.tm().txCommitted(tx.nearXidVersion(), tx.eventNodeId(),
             originatingThreadId);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java
index b7f8c2a..b19dec8 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java
@@ -12,6 +12,7 @@ package org.gridgain.grid.kernal.processors.cache.distributed;
 import org.apache.ignite.lang.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.direct.*;
 import org.gridgain.grid.util.typedef.internal.*;
 
@@ -58,7 +59,7 @@ public class GridCachePessimisticCheckCommittedTxRequest<K, V> extends GridDistr
      * @param originatingThreadId Originating thread ID.
      * @param futId Future ID.
      */
-    public GridCachePessimisticCheckCommittedTxRequest(GridCacheTxEx<K, V> tx, long originatingThreadId, IgniteUuid futId,
+    public GridCachePessimisticCheckCommittedTxRequest(IgniteTxEx<K, V> tx, long originatingThreadId, IgniteUuid futId,
         boolean nearOnlyCheck) {
         super(tx.xidVersion(), 0);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxCommitBuffer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxCommitBuffer.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxCommitBuffer.java
index 7317c25..daa8553 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxCommitBuffer.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheTxCommitBuffer.java
@@ -10,6 +10,7 @@
 package org.gridgain.grid.kernal.processors.cache.distributed;
 
 import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.jetbrains.annotations.*;
 
 import java.util.*;
@@ -23,7 +24,7 @@ public interface GridCacheTxCommitBuffer<K, V> {
      *
      * @param tx Committed transaction.
      */
-    public void addCommittedTx(GridCacheTxEx<K, V> tx);
+    public void addCommittedTx(IgniteTxEx<K, V> tx);
 
     /**
      * Gets transaction from commit buffer.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedCacheAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedCacheAdapter.java
index 778f1d6..e19fe92 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedCacheAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedCacheAdapter.java
@@ -13,6 +13,7 @@ import org.apache.ignite.lang.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
 
@@ -53,7 +54,7 @@ public abstract class GridDistributedCacheAdapter<K, V> extends GridCacheAdapter
     @Override public IgniteFuture<Boolean> txLockAsync(
         Collection<? extends K> keys,
         long timeout,
-        GridCacheTxLocalEx<K, V> tx,
+        IgniteTxLocalEx<K, V> tx,
         boolean isRead,
         boolean retval,
         IgniteTxIsolation isolation,
@@ -68,7 +69,7 @@ public abstract class GridDistributedCacheAdapter<K, V> extends GridCacheAdapter
     /** {@inheritDoc} */
     @Override public IgniteFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout,
         IgnitePredicate<GridCacheEntry<K, V>>... filter) {
-        GridCacheTxLocalEx<K, V> tx = ctx.tm().userTxx();
+        IgniteTxLocalEx<K, V> tx = ctx.tm().userTxx();
 
         // Return value flag is true because we choose to bring values for explicit locks.
         return lockAllAsync(keys, timeout, tx, false, false, /*retval*/true, null, filter);
@@ -86,7 +87,7 @@ public abstract class GridDistributedCacheAdapter<K, V> extends GridCacheAdapter
      * @return Future for locks.
      */
     protected abstract IgniteFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout,
-        @Nullable GridCacheTxLocalEx<K, V> tx, boolean isInvalidate, boolean isRead, boolean retval,
+        @Nullable IgniteTxLocalEx<K, V> tx, boolean isInvalidate, boolean isRead, boolean retval,
         @Nullable IgniteTxIsolation isolation, IgnitePredicate<GridCacheEntry<K, V>>[] filter);
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedCacheEntry.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedCacheEntry.java
index edab40b..05d99ec 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedCacheEntry.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedCacheEntry.java
@@ -10,6 +10,7 @@
 package org.gridgain.grid.kernal.processors.cache.distributed;
 
 import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
@@ -711,7 +712,7 @@ public class GridDistributedCacheEntry<K, V> extends GridCacheMapEntry<K, V> {
     }
 
     /** {@inheritDoc} */
-    @Override public boolean tmLock(GridCacheTxEx<K, V> tx, long timeout)
+    @Override public boolean tmLock(IgniteTxEx<K, V> tx, long timeout)
         throws GridCacheEntryRemovedException, GridDistributedLockCancelledException {
         if (tx.local())
             // Null is returned if timeout is negative and there is other lock owner.
@@ -746,7 +747,7 @@ public class GridDistributedCacheEntry<K, V> extends GridCacheMapEntry<K, V> {
     }
 
     /** {@inheritDoc} */
-    @Override public void txUnlock(GridCacheTxEx<K, V> tx) throws GridCacheEntryRemovedException {
+    @Override public void txUnlock(IgniteTxEx<K, V> tx) throws GridCacheEntryRemovedException {
         removeLock(tx.xidVersion());
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedLockRequest.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedLockRequest.java
index 512798e..749eff0 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedLockRequest.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedLockRequest.java
@@ -14,6 +14,7 @@ import org.apache.ignite.lang.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.direct.*;
 import org.gridgain.grid.util.tostring.*;
 import org.gridgain.grid.util.typedef.internal.*;
@@ -67,7 +68,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
     /** Write entries. */
     @GridToStringInclude
     @GridDirectTransient
-    private List<GridCacheTxEntry<K, V>> writeEntries;
+    private List<IgniteTxEntry<K, V>> writeEntries;
 
     /** Serialized write entries. */
     private byte[] writeEntriesBytes;
@@ -85,7 +86,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
 
     /** Group lock key if this is a group-lock transaction. */
     @GridDirectTransient
-    private GridCacheTxKey grpLockKey;
+    private IgniteTxKey grpLockKey;
 
     /** Group lock key bytes. */
     private byte[] grpLockKeyBytes;
@@ -135,7 +136,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
         long timeout,
         int keyCnt,
         int txSize,
-        @Nullable GridCacheTxKey grpLockKey,
+        @Nullable IgniteTxKey grpLockKey,
         boolean partLock
     ) {
         super(lockVer, keyCnt);
@@ -245,7 +246,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
     /**
      * @return Write entries list.
      */
-    public List<GridCacheTxEntry<K, V>> writeEntries() {
+    public List<IgniteTxEntry<K, V>> writeEntries() {
         return writeEntries;
     }
 
@@ -271,7 +272,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
     public void addKeyBytes(
         K key,
         @Nullable byte[] keyBytes,
-        @Nullable GridCacheTxEntry<K, V> writeEntry,
+        @Nullable IgniteTxEntry<K, V> writeEntry,
         boolean retVal,
         @Nullable Collection<GridCacheMvccCandidate<K>> cands,
         @Nullable GridCacheVersion drVer,
@@ -328,7 +329,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
     /**
      * @return Group lock key.
      */
-    @Nullable public GridCacheTxKey groupLockKey() {
+    @Nullable public IgniteTxKey groupLockKey() {
         return grpLockKey;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxFinishRequest.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxFinishRequest.java
index 15d2ce3..b5a61d0 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxFinishRequest.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxFinishRequest.java
@@ -13,6 +13,7 @@ import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.direct.*;
 import org.gridgain.grid.util.tostring.*;
 import org.gridgain.grid.util.typedef.*;
@@ -57,7 +58,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
     /** Transaction write entries. */
     @GridToStringInclude
     @GridDirectTransient
-    private Collection<GridCacheTxEntry<K, V>> writeEntries;
+    private Collection<IgniteTxEntry<K, V>> writeEntries;
 
     /** */
     @GridDirectCollection(byte[].class)
@@ -66,7 +67,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
     /** Write entries which have not been transferred to nodes during lock request. */
     @GridToStringInclude
     @GridDirectTransient
-    private Collection<GridCacheTxEntry<K, V>> recoveryWrites;
+    private Collection<IgniteTxEntry<K, V>> recoveryWrites;
 
     /** */
     @GridDirectCollection(byte[].class)
@@ -77,7 +78,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
 
     /** Group lock key. */
     @GridDirectTransient
-    private GridCacheTxKey grpLockKey;
+    private IgniteTxKey grpLockKey;
 
     /** Group lock key bytes. */
     private byte[] grpLockKeyBytes;
@@ -123,9 +124,9 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
         Collection<GridCacheVersion> committedVers,
         Collection<GridCacheVersion> rolledbackVers,
         int txSize,
-        Collection<GridCacheTxEntry<K, V>> writeEntries,
-        Collection<GridCacheTxEntry<K, V>> recoveryWrites,
-        @Nullable GridCacheTxKey grpLockKey
+        Collection<IgniteTxEntry<K, V>> writeEntries,
+        Collection<IgniteTxEntry<K, V>> recoveryWrites,
+        @Nullable IgniteTxKey grpLockKey
     ) {
         super(xidVer, writeEntries == null ? 0 : writeEntries.size());
         assert xidVer != null;
@@ -154,9 +155,9 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
         if (F.isEmpty(writeEntries))
             return;
 
-        Collection<GridCacheTxEntry<K, V>> cp = new ArrayList<>(writeEntries.size());
+        Collection<IgniteTxEntry<K, V>> cp = new ArrayList<>(writeEntries.size());
 
-        for (GridCacheTxEntry<K, V> e : writeEntries) {
+        for (IgniteTxEntry<K, V> e : writeEntries) {
             GridCacheContext<K, V> cacheCtx = e.context();
 
             // Clone only if it is a near cache.
@@ -236,14 +237,14 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
     /**
      * @return Write entries.
      */
-    public Collection<GridCacheTxEntry<K, V>> writes() {
+    public Collection<IgniteTxEntry<K, V>> writes() {
         return writeEntries;
     }
 
     /**
      * @return Recover entries.
      */
-    public Collection<GridCacheTxEntry<K, V>> recoveryWrites() {
+    public Collection<IgniteTxEntry<K, V>> recoveryWrites() {
         return recoveryWrites;
     }
 
@@ -272,7 +273,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
     /**
      * @return Group lock key.
      */
-    @Nullable public GridCacheTxKey groupLockKey() {
+    @Nullable public IgniteTxKey groupLockKey() {
         return grpLockKey;
     }
 
@@ -286,7 +287,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
 
             writeEntriesBytes = new ArrayList<>(writeEntries.size());
 
-            for (GridCacheTxEntry<K, V> e : writeEntries)
+            for (IgniteTxEntry<K, V> e : writeEntries)
                 writeEntriesBytes.add(ctx.marshaller().marshal(e));
         }
 
@@ -295,7 +296,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
 
             recoveryWritesBytes = new ArrayList<>(recoveryWrites.size());
 
-            for (GridCacheTxEntry<K, V> e : recoveryWrites)
+            for (IgniteTxEntry<K, V> e : recoveryWrites)
                 recoveryWritesBytes.add(ctx.marshaller().marshal(e));
         }
 
@@ -315,7 +316,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
             writeEntries = new ArrayList<>(writeEntriesBytes.size());
 
             for (byte[] arr : writeEntriesBytes)
-                writeEntries.add(ctx.marshaller().<GridCacheTxEntry<K, V>>unmarshal(arr, ldr));
+                writeEntries.add(ctx.marshaller().<IgniteTxEntry<K, V>>unmarshal(arr, ldr));
 
             unmarshalTx(writeEntries, false, ctx, ldr);
         }
@@ -324,7 +325,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
             recoveryWrites = new ArrayList<>(recoveryWritesBytes.size());
 
             for (byte[] arr : recoveryWritesBytes)
-                recoveryWrites.add(ctx.marshaller().<GridCacheTxEntry<K, V>>unmarshal(arr, ldr));
+                recoveryWrites.add(ctx.marshaller().<IgniteTxEntry<K, V>>unmarshal(arr, ldr));
 
             unmarshalTx(recoveryWrites, false, ctx, ldr);
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxMapping.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxMapping.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxMapping.java
index 145b807..5b59f81 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxMapping.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxMapping.java
@@ -11,6 +11,7 @@ package org.gridgain.grid.kernal.processors.cache.distributed;
 
 import org.apache.ignite.cluster.*;
 import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.gridgain.grid.util.tostring.*;
@@ -33,7 +34,7 @@ public class GridDistributedTxMapping<K, V> implements Externalizable {
 
     /** Entries. */
     @GridToStringInclude
-    private Collection<GridCacheTxEntry<K, V>> entries;
+    private Collection<IgniteTxEntry<K, V>> entries;
 
     /** Explicit lock flag. */
     private boolean explicitLock;
@@ -121,7 +122,7 @@ public class GridDistributedTxMapping<K, V> implements Externalizable {
     /**
      * @return Entries.
      */
-    public Collection<GridCacheTxEntry<K, V>> entries() {
+    public Collection<IgniteTxEntry<K, V>> entries() {
         return entries;
     }
 
@@ -129,7 +130,7 @@ public class GridDistributedTxMapping<K, V> implements Externalizable {
      * @param entries Mapped entries.
      * @param readOnly Flag indicating that passed in collection is read-only.
      */
-    public void entries(Collection<GridCacheTxEntry<K, V>> entries, boolean readOnly) {
+    public void entries(Collection<IgniteTxEntry<K, V>> entries, boolean readOnly) {
         this.entries = entries;
 
         // Set copy on remove flag as passed in collection is unmodifiable.
@@ -163,28 +164,28 @@ public class GridDistributedTxMapping<K, V> implements Externalizable {
     public void dhtVersion(GridCacheVersion dhtVer) {
         this.dhtVer = dhtVer;
 
-        for (GridCacheTxEntry<K, V> e : entries)
+        for (IgniteTxEntry<K, V> e : entries)
             e.dhtVersion(dhtVer);
     }
 
     /**
      * @return Reads.
      */
-    public Collection<GridCacheTxEntry<K, V>> reads() {
+    public Collection<IgniteTxEntry<K, V>> reads() {
         return F.view(entries, CU.<K, V>reads());
     }
 
     /**
      * @return Writes.
      */
-    public Collection<GridCacheTxEntry<K, V>> writes() {
+    public Collection<IgniteTxEntry<K, V>> writes() {
         return F.view(entries, CU.<K, V>writes());
     }
 
     /**
      * @param entry Adds entry.
      */
-    public void add(GridCacheTxEntry<K, V> entry) {
+    public void add(IgniteTxEntry<K, V> entry) {
         ensureModifiable();
 
         entries.add(entry);
@@ -194,7 +195,7 @@ public class GridDistributedTxMapping<K, V> implements Externalizable {
      * @param entry Entry to remove.
      * @return {@code True} if entry was removed.
      */
-    public boolean removeEntry(GridCacheTxEntry<K, V> entry) {
+    public boolean removeEntry(IgniteTxEntry<K, V> entry) {
         ensureModifiable();
 
         return entries.remove(entry);
@@ -215,11 +216,11 @@ public class GridDistributedTxMapping<K, V> implements Externalizable {
      * @param parts Partitions.
      * @param c Collection.
      */
-    private void evictPartitions(int[] parts, Collection<GridCacheTxEntry<K, V>> c) {
+    private void evictPartitions(int[] parts, Collection<IgniteTxEntry<K, V>> c) {
         assert parts != null;
 
-        for (Iterator<GridCacheTxEntry<K, V>> it = c.iterator(); it.hasNext();) {
-            GridCacheTxEntry<K, V> e = it.next();
+        for (Iterator<IgniteTxEntry<K, V>> it = c.iterator(); it.hasNext();) {
+            IgniteTxEntry<K, V> e = it.next();
 
             GridCacheEntryEx<K,V> cached = e.cached();
 
@@ -231,7 +232,7 @@ public class GridDistributedTxMapping<K, V> implements Externalizable {
     /**
      * @param keys Keys to evict readers for.
      */
-    public void evictReaders(@Nullable Collection<GridCacheTxKey<K>> keys) {
+    public void evictReaders(@Nullable Collection<IgniteTxKey<K>> keys) {
         if (keys == null || keys.isEmpty())
             return;
 
@@ -244,12 +245,12 @@ public class GridDistributedTxMapping<K, V> implements Externalizable {
      * @param keys Keys to evict readers for.
      * @param entries Entries to check.
      */
-    private void evictReaders(Collection<GridCacheTxKey<K>> keys, @Nullable Collection<GridCacheTxEntry<K, V>> entries) {
+    private void evictReaders(Collection<IgniteTxKey<K>> keys, @Nullable Collection<IgniteTxEntry<K, V>> entries) {
         if (entries == null || entries.isEmpty())
             return;
 
-        for (Iterator<GridCacheTxEntry<K, V>> it = entries.iterator(); it.hasNext();) {
-            GridCacheTxEntry<K, V> entry = it.next();
+        for (Iterator<IgniteTxEntry<K, V>> it = entries.iterator(); it.hasNext();) {
+            IgniteTxEntry<K, V> entry = it.next();
 
             if (keys.contains(entry.txKey()))
                 it.remove();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxPrepareRequest.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
index eac9362..c3bf7af 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
@@ -13,6 +13,7 @@ import org.apache.ignite.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.direct.*;
 import org.gridgain.grid.util.tostring.*;
 import org.gridgain.grid.util.typedef.*;
@@ -57,7 +58,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
     /** Transaction read set. */
     @GridToStringInclude
     @GridDirectTransient
-    private Collection<GridCacheTxEntry<K, V>> reads;
+    private Collection<IgniteTxEntry<K, V>> reads;
 
     /** */
     @GridDirectCollection(byte[].class)
@@ -66,7 +67,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
     /** Transaction write entries. */
     @GridToStringInclude
     @GridDirectTransient
-    private Collection<GridCacheTxEntry<K, V>> writes;
+    private Collection<IgniteTxEntry<K, V>> writes;
 
     /** */
     @GridDirectCollection(byte[].class)
@@ -75,7 +76,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
     /** DHT versions to verify. */
     @GridToStringInclude
     @GridDirectTransient
-    private Map<GridCacheTxKey<K>, GridCacheVersion> dhtVers;
+    private Map<IgniteTxKey<K>, GridCacheVersion> dhtVers;
 
     /** Serialized map. */
     @GridToStringExclude
@@ -84,7 +85,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
     /** Group lock key, if any. */
     @GridToStringInclude
     @GridDirectTransient
-    private GridCacheTxKey grpLockKey;
+    private IgniteTxKey grpLockKey;
 
     /** Group lock key bytes. */
     @GridToStringExclude
@@ -122,10 +123,10 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
      * @param txNodes Transaction nodes mapping.
      */
     public GridDistributedTxPrepareRequest(
-        GridCacheTxEx<K, V> tx,
-        @Nullable Collection<GridCacheTxEntry<K, V>> reads,
-        Collection<GridCacheTxEntry<K, V>> writes,
-        GridCacheTxKey grpLockKey,
+        IgniteTxEx<K, V> tx,
+        @Nullable Collection<IgniteTxEntry<K, V>> reads,
+        Collection<IgniteTxEntry<K, V>> writes,
+        IgniteTxKey grpLockKey,
         boolean partLock,
         Map<UUID, Collection<UUID>> txNodes
     ) {
@@ -167,7 +168,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
      * @param key Key for which version is verified.
      * @param dhtVer DHT version to check.
      */
-    public void addDhtVersion(GridCacheTxKey<K> key, @Nullable GridCacheVersion dhtVer) {
+    public void addDhtVersion(IgniteTxKey<K> key, @Nullable GridCacheVersion dhtVer) {
         if (dhtVers == null)
             dhtVers = new HashMap<>();
 
@@ -177,8 +178,8 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
     /**
      * @return Map of versions to be verified.
      */
-    public Map<GridCacheTxKey<K>, GridCacheVersion> dhtVersions() {
-        return dhtVers == null ? Collections.<GridCacheTxKey<K>, GridCacheVersion>emptyMap() : dhtVers;
+    public Map<IgniteTxKey<K>, GridCacheVersion> dhtVersions() {
+        return dhtVers == null ? Collections.<IgniteTxKey<K>, GridCacheVersion>emptyMap() : dhtVers;
     }
 
     /**
@@ -222,35 +223,35 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
     /**
      * @return Read set.
      */
-    public Collection<GridCacheTxEntry<K, V>> reads() {
+    public Collection<IgniteTxEntry<K, V>> reads() {
         return reads;
     }
 
     /**
      * @return Write entries.
      */
-    public Collection<GridCacheTxEntry<K, V>> writes() {
+    public Collection<IgniteTxEntry<K, V>> writes() {
         return writes;
     }
 
     /**
      * @param reads Reads.
      */
-    protected void reads(Collection<GridCacheTxEntry<K, V>> reads) {
+    protected void reads(Collection<IgniteTxEntry<K, V>> reads) {
         this.reads = reads;
     }
 
     /**
      * @param writes Writes.
      */
-    protected void writes(Collection<GridCacheTxEntry<K, V>> writes) {
+    protected void writes(Collection<IgniteTxEntry<K, V>> writes) {
         this.writes = writes;
     }
 
     /**
      * @return Group lock key if preparing group-lock transaction.
      */
-    @Nullable public GridCacheTxKey groupLockKey() {
+    @Nullable public IgniteTxKey groupLockKey() {
         return grpLockKey;
     }
 
@@ -278,7 +279,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
 
             writesBytes = new ArrayList<>(writes.size());
 
-            for (GridCacheTxEntry<K, V> e : writes)
+            for (IgniteTxEntry<K, V> e : writes)
                 writesBytes.add(ctx.marshaller().marshal(e));
         }
 
@@ -287,7 +288,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
 
             readsBytes = new ArrayList<>(reads.size());
 
-            for (GridCacheTxEntry<K, V> e : reads)
+            for (IgniteTxEntry<K, V> e : reads)
                 readsBytes.add(ctx.marshaller().marshal(e));
         }
 
@@ -309,7 +310,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
             writes = new ArrayList<>(writesBytes.size());
 
             for (byte[] arr : writesBytes)
-                writes.add(ctx.marshaller().<GridCacheTxEntry<K, V>>unmarshal(arr, ldr));
+                writes.add(ctx.marshaller().<IgniteTxEntry<K, V>>unmarshal(arr, ldr));
 
             unmarshalTx(writes, false, ctx, ldr);
         }
@@ -318,7 +319,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
             reads = new ArrayList<>(readsBytes.size());
 
             for (byte[] arr : readsBytes)
-                reads.add(ctx.marshaller().<GridCacheTxEntry<K, V>>unmarshal(arr, ldr));
+                reads.add(ctx.marshaller().<IgniteTxEntry<K, V>>unmarshal(arr, ldr));
 
             unmarshalTx(reads, false, ctx, ldr);
         }
@@ -339,13 +340,13 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
      * @param col Set to write.
      * @throws IOException If write failed.
      */
-    private void writeCollection(ObjectOutput out, Collection<GridCacheTxEntry<K, V>> col) throws IOException {
+    private void writeCollection(ObjectOutput out, Collection<IgniteTxEntry<K, V>> col) throws IOException {
         boolean empty = F.isEmpty(col);
 
         if (!empty) {
             out.writeInt(col.size());
 
-            for (GridCacheTxEntry<K, V> e : col) {
+            for (IgniteTxEntry<K, V> e : col) {
                 V val = e.value();
                 boolean hasWriteVal = e.hasWriteValue();
                 boolean hasReadVal = e.hasReadValue();
@@ -374,9 +375,9 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
      * @throws ClassNotFoundException If deserialized class could not be found.
      */
     @SuppressWarnings({"unchecked"})
-    @Nullable private Collection<GridCacheTxEntry<K, V>> readCollection(ObjectInput in) throws IOException,
+    @Nullable private Collection<IgniteTxEntry<K, V>> readCollection(ObjectInput in) throws IOException,
         ClassNotFoundException {
-        List<GridCacheTxEntry<K, V>> col = null;
+        List<IgniteTxEntry<K, V>> col = null;
 
         int size = in.readInt();
 
@@ -385,10 +386,10 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
             col = new ArrayList<>(size);
 
             for (int i = 0; i < size; i++)
-                col.add((GridCacheTxEntry<K, V>)in.readObject());
+                col.add((IgniteTxEntry<K, V>)in.readObject());
         }
 
-        return col == null ? Collections.<GridCacheTxEntry<K,V>>emptyList() : col;
+        return col == null ? Collections.<IgniteTxEntry<K,V>>emptyList() : col;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
index 88c55df..70ddbe2 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
@@ -15,6 +15,7 @@ import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.near.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.future.*;
 import org.gridgain.grid.util.lang.*;
 import org.gridgain.grid.util.tostring.*;
@@ -33,18 +34,18 @@ import static org.gridgain.grid.kernal.processors.dr.GridDrType.*;
 /**
  * Transaction created by system implicitly on remote nodes.
  */
-public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K, V>
-    implements GridCacheTxRemoteEx<K, V> {
+public class GridDistributedTxRemoteAdapter<K, V> extends IgniteTxAdapter<K, V>
+    implements IgniteTxRemoteEx<K, V> {
     /** */
     private static final long serialVersionUID = 0L;
 
     /** Read set. */
     @GridToStringInclude
-    protected Map<GridCacheTxKey<K>, GridCacheTxEntry<K, V>> readMap;
+    protected Map<IgniteTxKey<K>, IgniteTxEntry<K, V>> readMap;
 
     /** Write map. */
     @GridToStringInclude
-    protected Map<GridCacheTxKey<K>, GridCacheTxEntry<K, V>> writeMap;
+    protected Map<IgniteTxKey<K>, IgniteTxEntry<K, V>> writeMap;
 
     /** Remote thread ID. */
     @GridToStringInclude
@@ -95,7 +96,7 @@ public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K,
         boolean invalidate,
         long timeout,
         int txSize,
-        @Nullable GridCacheTxKey grpLockKey,
+        @Nullable IgniteTxKey grpLockKey,
         @Nullable UUID subjId,
         int taskNameHash
     ) {
@@ -151,8 +152,8 @@ public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K,
     }
 
     /** {@inheritDoc} */
-    @Override public boolean removed(GridCacheTxKey<K> key) {
-        GridCacheTxEntry e = writeMap.get(key);
+    @Override public boolean removed(IgniteTxKey<K> key) {
+        IgniteTxEntry e = writeMap.get(key);
 
         return e != null && e.op() == DELETE;
     }
@@ -163,12 +164,12 @@ public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K,
     }
 
     /** {@inheritDoc} */
-    @Override public Map<GridCacheTxKey<K>, GridCacheTxEntry<K, V>> writeMap() {
+    @Override public Map<IgniteTxKey<K>, IgniteTxEntry<K, V>> writeMap() {
         return writeMap;
     }
 
     /** {@inheritDoc} */
-    @Override public Map<GridCacheTxKey<K>, GridCacheTxEntry<K, V>> readMap() {
+    @Override public Map<IgniteTxKey<K>, IgniteTxEntry<K, V>> readMap() {
         return readMap;
     }
 
@@ -182,7 +183,7 @@ public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K,
      *
      * @param key Key.
      */
-    public void groupLockKey(GridCacheTxKey key) {
+    public void groupLockKey(IgniteTxKey key) {
         if (grpLockKey == null)
             grpLockKey = key;
     }
@@ -196,8 +197,8 @@ public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K,
     }
 
     /** {@inheritDoc} */
-    @Override public GridCacheTxEntry<K, V> entry(GridCacheTxKey<K> key) {
-        GridCacheTxEntry<K, V> e = writeMap == null ? null : writeMap.get(key);
+    @Override public IgniteTxEntry<K, V> entry(IgniteTxKey<K> key) {
+        IgniteTxEntry<K, V> e = writeMap == null ? null : writeMap.get(key);
 
         if (e == null)
             e = readMap == null ? null : readMap.get(key);
@@ -210,7 +211,7 @@ public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K,
      *
      * @param key key to be removed.
      */
-    public void clearEntry(GridCacheTxKey<K> key) {
+    public void clearEntry(IgniteTxKey<K> key) {
         readMap.remove(key);
         writeMap.remove(key);
     }
@@ -223,12 +224,12 @@ public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K,
     @Override public void doneRemote(GridCacheVersion baseVer, Collection<GridCacheVersion> committedVers,
         Collection<GridCacheVersion> rolledbackVers, Collection<GridCacheVersion> pendingVers) {
         if (readMap != null && !readMap.isEmpty()) {
-            for (GridCacheTxEntry<K, V> txEntry : readMap.values())
+            for (IgniteTxEntry<K, V> txEntry : readMap.values())
                 doneRemote(txEntry, baseVer, committedVers, rolledbackVers, pendingVers);
         }
 
         if (writeMap != null && !writeMap.isEmpty()) {
-            for (GridCacheTxEntry<K, V> txEntry : writeMap.values())
+            for (IgniteTxEntry<K, V> txEntry : writeMap.values())
                 doneRemote(txEntry, baseVer, committedVers, rolledbackVers, pendingVers);
         }
     }
@@ -242,7 +243,7 @@ public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K,
      * @param rolledbackVers Rolled back versions relative to base version.
      * @param pendingVers Pending versions.
      */
-    private void doneRemote(GridCacheTxEntry<K, V> txEntry, GridCacheVersion baseVer,
+    private void doneRemote(IgniteTxEntry<K, V> txEntry, GridCacheVersion baseVer,
         Collection<GridCacheVersion> committedVers, Collection<GridCacheVersion> rolledbackVers,
         Collection<GridCacheVersion> pendingVers) {
         while (true) {
@@ -301,10 +302,10 @@ public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K,
      * @param keyBytes Key bytes.
      * @param drVer Data center replication version.
      */
-    public void addRead(GridCacheContext<K, V> cacheCtx, GridCacheTxKey<K> key, byte[] keyBytes, @Nullable GridCacheVersion drVer) {
+    public void addRead(GridCacheContext<K, V> cacheCtx, IgniteTxKey<K> key, byte[] keyBytes, @Nullable GridCacheVersion drVer) {
         checkInternal(key);
 
-        GridCacheTxEntry<K, V> txEntry = new GridCacheTxEntry<>(cacheCtx, this, READ, null, 0L, -1L,
+        IgniteTxEntry<K, V> txEntry = new IgniteTxEntry<>(cacheCtx, this, READ, null, 0L, -1L,
             cacheCtx.cache().entryEx(key.key()), drVer);
 
         txEntry.keyBytes(keyBytes);
@@ -320,11 +321,11 @@ public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K,
      * @param valBytes Write value bytes.
      * @param drVer Data center replication version.
      */
-    public void addWrite(GridCacheContext<K, V> cacheCtx, GridCacheTxKey<K> key, byte[] keyBytes, GridCacheOperation op, V val, byte[] valBytes,
+    public void addWrite(GridCacheContext<K, V> cacheCtx, IgniteTxKey<K> key, byte[] keyBytes, GridCacheOperation op, V val, byte[] valBytes,
         @Nullable GridCacheVersion drVer) {
         checkInternal(key);
 
-        GridCacheTxEntry<K, V> txEntry = new GridCacheTxEntry<>(cacheCtx, this, op, val, 0L, -1L,
+        IgniteTxEntry<K, V> txEntry = new IgniteTxEntry<>(cacheCtx, this, op, val, 0L, -1L,
             cacheCtx.cache().entryEx(key.key()), drVer);
 
         txEntry.keyBytes(keyBytes);
@@ -337,13 +338,13 @@ public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K,
      * @param e Transaction entry to set.
      * @return {@code True} if value was set.
      */
-    @Override public boolean setWriteValue(GridCacheTxEntry<K, V> e) {
+    @Override public boolean setWriteValue(IgniteTxEntry<K, V> e) {
         checkInternal(e.txKey());
 
-        GridCacheTxEntry<K, V> entry = writeMap.get(e.txKey());
+        IgniteTxEntry<K, V> entry = writeMap.get(e.txKey());
 
         if (entry == null) {
-            GridCacheTxEntry<K, V> rmv = readMap.remove(e.txKey());
+            IgniteTxEntry<K, V> rmv = readMap.remove(e.txKey());
 
             if (rmv != null) {
                 e.cached(rmv.cached(), rmv.keyBytes());
@@ -379,38 +380,38 @@ public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K,
     }
 
     /** {@inheritDoc} */
-    @Override public boolean hasWriteKey(GridCacheTxKey<K> key) {
+    @Override public boolean hasWriteKey(IgniteTxKey<K> key) {
         return writeMap.containsKey(key);
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteFuture<GridCacheTxEx<K, V>> prepareAsync() {
+    @Override public IgniteFuture<IgniteTxEx<K, V>> prepareAsync() {
         assert false;
         return null;
     }
 
     /** {@inheritDoc} */
-    @Override public Set<GridCacheTxKey<K>> readSet() {
+    @Override public Set<IgniteTxKey<K>> readSet() {
         return readMap.keySet();
     }
 
     /** {@inheritDoc} */
-    @Override public Set<GridCacheTxKey<K>> writeSet() {
+    @Override public Set<IgniteTxKey<K>> writeSet() {
         return writeMap.keySet();
     }
 
     /** {@inheritDoc} */
-    @Override public Collection<GridCacheTxEntry<K, V>> allEntries() {
+    @Override public Collection<IgniteTxEntry<K, V>> allEntries() {
         return F.concat(false, writeEntries(), readEntries());
     }
 
     /** {@inheritDoc} */
-    @Override public Collection<GridCacheTxEntry<K, V>> writeEntries() {
+    @Override public Collection<IgniteTxEntry<K, V>> writeEntries() {
         return writeMap.values();
     }
 
     /** {@inheritDoc} */
-    @Override public Collection<GridCacheTxEntry<K, V>> readEntries() {
+    @Override public Collection<IgniteTxEntry<K, V>> readEntries() {
         return readMap.values();
     }
 
@@ -450,7 +451,7 @@ public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K,
     @SuppressWarnings({"CatchGenericClass"})
     private void commitIfLocked() throws IgniteCheckedException {
         if (state() == COMMITTING) {
-            for (GridCacheTxEntry<K, V> txEntry : writeMap.values()) {
+            for (IgniteTxEntry<K, V> txEntry : writeMap.values()) {
                 assert txEntry != null : "Missing transaction entry for tx: " + this;
 
                 while (true) {
@@ -493,7 +494,7 @@ public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K,
                     long topVer = topologyVersion();
 
                     // Node that for near transactions we grab all entries.
-                    for (GridCacheTxEntry<K, V> txEntry : (near() ? allEntries() : writeEntries())) {
+                    for (IgniteTxEntry<K, V> txEntry : (near() ? allEntries() : writeEntries())) {
                         GridCacheContext<K, V> cacheCtx = txEntry.context();
 
                         boolean replicate = cacheCtx.isDrEnabled();
@@ -775,7 +776,7 @@ public class GridDistributedTxRemoteAdapter<K, V> extends GridCacheTxAdapter<K,
      *
      * @param e Transaction entry.
      */
-    protected void addExplicit(GridCacheTxEntry<K, V> e) {
+    protected void addExplicit(IgniteTxEntry<K, V> e) {
         if (e.explicitVersion() != null) {
             if (explicitVers == null)
                 explicitVers = new LinkedList<>();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtCacheEntry.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtCacheEntry.java
index 978b60b..e092889 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtCacheEntry.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtCacheEntry.java
@@ -15,6 +15,7 @@ import org.apache.ignite.lang.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.lang.*;
 import org.gridgain.grid.util.tostring.*;
 import org.gridgain.grid.util.typedef.*;
@@ -223,7 +224,7 @@ public class GridDhtCacheEntry<K, V> extends GridDistributedCacheEntry<K, V> {
     }
 
     /** {@inheritDoc} */
-    @Override public boolean tmLock(GridCacheTxEx<K, V> tx, long timeout)
+    @Override public boolean tmLock(IgniteTxEx<K, V> tx, long timeout)
         throws GridCacheEntryRemovedException, GridDistributedLockCancelledException {
         if (tx.local()) {
             GridDhtTxLocalAdapter<K, V> dhtTx = (GridDhtTxLocalAdapter<K, V>)tx;
@@ -425,7 +426,7 @@ public class GridDhtCacheEntry<K, V> extends GridDistributedCacheEntry<K, V> {
 
             if (!F.isEmpty(cands)) {
                 for (GridCacheMvccCandidate<K> c : cands) {
-                    GridCacheTxEx<K, V> tx = cctx.tm().tx(c.version());
+                    IgniteTxEx<K, V> tx = cctx.tm().tx(c.version());
 
                     if (tx != null) {
                         assert tx.local();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtGetFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtGetFuture.java
index 6db3540..a62ec49 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtGetFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtGetFuture.java
@@ -13,6 +13,7 @@ import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
@@ -63,7 +64,7 @@ public final class GridDhtGetFuture<K, V> extends GridCompoundIdentityFuture<Col
     private long topVer;
 
     /** Transaction. */
-    private GridCacheTxLocalEx<K, V> tx;
+    private IgniteTxLocalEx<K, V> tx;
 
     /** Filters. */
     private IgnitePredicate<GridCacheEntry<K, V>>[] filters;
@@ -106,7 +107,7 @@ public final class GridDhtGetFuture<K, V> extends GridCompoundIdentityFuture<Col
         UUID reader,
         LinkedHashMap<? extends K, Boolean> keys,
         boolean reload,
-        @Nullable GridCacheTxLocalEx<K, V> tx,
+        @Nullable IgniteTxLocalEx<K, V> tx,
         long topVer,
         @Nullable IgnitePredicate<GridCacheEntry<K, V>>[] filters,
         @Nullable UUID subjId,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockFuture.java
index 2da6589..5a9ee72 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockFuture.java
@@ -16,6 +16,7 @@ import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.kernal.processors.timeout.*;
 import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.future.*;
@@ -1177,7 +1178,7 @@ public final class GridDhtLockFuture<K, V> extends GridCompoundIdentityFuture<Bo
          * @param entries Entries to check.
          */
         @SuppressWarnings({"ForLoopReplaceableByForEach"})
-        private void evictReaders(GridCacheContext<K, V> cacheCtx, Collection<GridCacheTxKey<K>> keys, UUID nodeId, long msgId,
+        private void evictReaders(GridCacheContext<K, V> cacheCtx, Collection<IgniteTxKey<K>> keys, UUID nodeId, long msgId,
             @Nullable List<GridDhtCacheEntry<K, V>> entries) {
             if (entries == null || keys == null || entries.isEmpty() || keys.isEmpty())
                 return;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockRequest.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockRequest.java
index e05041a..cb4ef69 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockRequest.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockRequest.java
@@ -15,6 +15,7 @@ import org.apache.ignite.transactions.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.direct.*;
 import org.gridgain.grid.util.tostring.*;
@@ -115,7 +116,7 @@ public class GridDhtLockRequest<K, V> extends GridDistributedLockRequest<K, V> {
         int dhtCnt,
         int nearCnt,
         int txSize,
-        @Nullable GridCacheTxKey grpLockKey,
+        @Nullable IgniteTxKey grpLockKey,
         boolean partLock,
         @Nullable UUID subjId,
         int taskNameHash
@@ -215,7 +216,7 @@ public class GridDhtLockRequest<K, V> extends GridDistributedLockRequest<K, V> {
     public void addDhtKey(
         K key,
         byte[] keyBytes,
-        GridCacheTxEntry<K, V> writeEntry,
+        IgniteTxEntry<K, V> writeEntry,
         @Nullable GridCacheVersion drVer,
         boolean invalidateEntry,
         GridCacheContext<K, V> ctx

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockResponse.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockResponse.java
index 3a86b4e..9eaf250 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockResponse.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtLockResponse.java
@@ -14,6 +14,7 @@ import org.apache.ignite.lang.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.direct.*;
 import org.gridgain.grid.util.tostring.*;
@@ -33,7 +34,7 @@ public class GridDhtLockResponse<K, V> extends GridDistributedLockResponse<K, V>
     /** Evicted readers. */
     @GridToStringInclude
     @GridDirectTransient
-    private Collection<GridCacheTxKey<K>> nearEvicted;
+    private Collection<IgniteTxKey<K>> nearEvicted;
 
     /** Evicted reader key bytes. */
     @GridDirectCollection(byte[].class)
@@ -94,14 +95,14 @@ public class GridDhtLockResponse<K, V> extends GridDistributedLockResponse<K, V>
     /**
      * @return Evicted readers.
      */
-    public Collection<GridCacheTxKey<K>> nearEvicted() {
+    public Collection<IgniteTxKey<K>> nearEvicted() {
         return nearEvicted;
     }
 
     /**
      * @param nearEvicted Evicted readers.
      */
-    public void nearEvicted(Collection<GridCacheTxKey<K>> nearEvicted) {
+    public void nearEvicted(Collection<IgniteTxKey<K>> nearEvicted) {
         this.nearEvicted = nearEvicted;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
index decad36..5aa7154 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
@@ -18,6 +18,7 @@ import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.dht.preloader.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.near.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.future.*;
 import org.gridgain.grid.util.lang.*;
@@ -127,7 +128,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
         GridDhtLockResponse<K, V> res)
         throws IgniteCheckedException, GridDistributedLockCancelledException {
         List<K> keys = req.keys();
-        List<GridCacheTxEntry<K, V>> writes = req.writeEntries();
+        List<IgniteTxEntry<K, V>> writes = req.writeEntries();
 
         GridDhtTxRemote<K, V> tx = null;
 
@@ -139,9 +140,9 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
             if (key == null)
                 continue;
 
-            GridCacheTxKey<K> txKey = ctx.txKey(key);
+            IgniteTxKey<K> txKey = ctx.txKey(key);
 
-            GridCacheTxEntry<K, V> writeEntry = writes == null ? null : writes.get(i);
+            IgniteTxEntry<K, V> writeEntry = writes == null ? null : writes.get(i);
 
             assert F.isEmpty(req.candidatesByIndex(i));
 
@@ -379,10 +380,10 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
                 res.nearEvicted(nearTx.evicted());
             else {
                 if (!F.isEmpty(req.nearKeys())) {
-                    Collection<GridCacheTxKey<K>> nearEvicted = new ArrayList<>(req.nearKeys().size());
+                    Collection<IgniteTxKey<K>> nearEvicted = new ArrayList<>(req.nearKeys().size());
 
-                    nearEvicted.addAll(F.viewReadOnly(req.nearKeys(), new C1<K, GridCacheTxKey<K>>() {
-                        @Override public GridCacheTxKey<K> apply(K k) {
+                    nearEvicted.addAll(F.viewReadOnly(req.nearKeys(), new C1<K, IgniteTxKey<K>>() {
+                        @Override public IgniteTxKey<K> apply(K k) {
                             return ctx.txKey(k);
                         }
                     }));
@@ -541,7 +542,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
     /** {@inheritDoc} */
     @Override public IgniteFuture<Boolean> lockAllAsync(@Nullable Collection<? extends K> keys,
         long timeout,
-        GridCacheTxLocalEx<K, V> txx,
+        IgniteTxLocalEx<K, V> txx,
         boolean isInvalidate,
         boolean isRead,
         boolean retval,
@@ -565,7 +566,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
      */
     public GridDhtFuture<Boolean> lockAllAsyncInternal(@Nullable Collection<? extends K> keys,
         long timeout,
-        GridCacheTxLocalEx<K, V> txx,
+        IgniteTxLocalEx<K, V> txx,
         boolean isInvalidate,
         boolean isRead,
         boolean retval,
@@ -980,7 +981,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
                                     boolean filterPassed = false;
 
                                     if (tx != null && tx.onePhaseCommit()) {
-                                        GridCacheTxEntry<K, V> writeEntry = tx.entry(ctx.txKey(e.key()));
+                                        IgniteTxEntry<K, V> writeEntry = tx.entry(ctx.txKey(e.key()));
 
                                         assert writeEntry != null :
                                             "Missing tx entry for locked cache entry: " + e;
@@ -1050,7 +1051,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
      */
     private void sendLockReply(
         ClusterNode nearNode,
-        @Nullable GridCacheTxEx<K,V> tx,
+        @Nullable IgniteTxEx<K,V> tx,
         GridNearLockRequest<K, V> req,
         GridNearLockResponse<K, V> res
     ) {


Mime
View raw message