ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [32/46] incubator-ignite git commit: GG-9141 - Renaming.
Date Sun, 21 Dec 2014 23:04:25 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxMap.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxMap.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxMap.java
new file mode 100644
index 0000000..0c7fce4
--- /dev/null
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxMap.java
@@ -0,0 +1,179 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.gridgain.grid.kernal.processors.cache.transactions;
+
+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 IgniteTxMap<K, V> extends AbstractMap<IgniteTxKey<K>, IgniteTxEntry<K,
V>> implements Externalizable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Base transaction map. */
+    private Map<IgniteTxKey<K>, IgniteTxEntry<K, V>> txMap;
+
+    /** Entry set. */
+    private Set<Entry<IgniteTxKey<K>, IgniteTxEntry<K, V>>> entrySet;
+
+    /** Cached size. */
+    private int size = -1;
+
+    /** Empty flag. */
+    private Boolean empty;
+
+    /** Sealed flag. */
+    private boolean sealed;
+
+    /** Filter. */
+    private IgnitePredicate<IgniteTxEntry<K, V>> filter;
+
+    /**
+     * Empty constructor required for {@link Externalizable}.
+     */
+    public IgniteTxMap() {
+        // No-op.
+    }
+
+    /**
+     * @param txMap Transaction map.
+     * @param filter Filter.
+     */
+    public IgniteTxMap(Map<IgniteTxKey<K>, IgniteTxEntry<K, V>> txMap,
+        IgnitePredicate<IgniteTxEntry<K, V>> filter) {
+        this.txMap = txMap;
+        this.filter = filter;
+    }
+
+    /**
+     * Seals this map.
+     *
+     * @return This map for chaining.
+     */
+    IgniteTxMap<K, V> seal() {
+        sealed = true;
+
+        return this;
+    }
+
+    /**
+     * @return Sealed flag.
+     */
+    boolean sealed() {
+        return sealed;
+    }
+
+    /** {@inheritDoc} */
+    @Override public Set<Entry<IgniteTxKey<K>, IgniteTxEntry<K, V>>>
entrySet() {
+        if (entrySet == null) {
+            entrySet = new GridSerializableSet<Entry<IgniteTxKey<K>, IgniteTxEntry<K,
V>>>() {
+                private Set<Entry<IgniteTxKey<K>, IgniteTxEntry<K, V>>>
set = txMap.entrySet();
+
+                @Override public Iterator<Entry<IgniteTxKey<K>, IgniteTxEntry<K,
V>>> iterator() {
+                    return new GridSerializableIterator<Entry<IgniteTxKey<K>,
IgniteTxEntry<K, V>>>() {
+                        private Iterator<Entry<IgniteTxKey<K>, IgniteTxEntry<K,
V>>> it = set.iterator();
+
+                        private Entry<IgniteTxKey<K>, IgniteTxEntry<K, V>>
cur;
+
+                        // Constructor.
+                        {
+                            advance();
+                        }
+
+                        @Override public boolean hasNext() {
+                            return cur != null;
+                        }
+
+                        @Override public Entry<IgniteTxKey<K>, IgniteTxEntry<K,
V>> next() {
+                            if (cur == null)
+                                throw new NoSuchElementException();
+
+                            Entry<IgniteTxKey<K>, IgniteTxEntry<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<IgniteTxKey<K>, IgniteTxEntry<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 IgniteTxEntry<K, V> get(Object key) {
+        IgniteTxEntry<K, V> e = txMap.get(key);
+
+        return e == null ? null : filter.apply(e) ? e : null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteTxEntry<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/transactions/IgniteTxProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxProxyImpl.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxProxyImpl.java
index e41a5ad..a39a315 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxProxyImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxProxyImpl.java
@@ -31,7 +31,7 @@ public class IgniteTxProxyImpl<K, V> implements IgniteTxProxy, Externalizable
{
 
     /** Wrapped transaction. */
     @GridToStringInclude
-    private GridCacheTxEx<K, V> tx;
+    private IgniteTxEx<K, V> tx;
 
     /** Gateway. */
     @GridToStringExclude
@@ -47,7 +47,7 @@ public class IgniteTxProxyImpl<K, V> implements IgniteTxProxy, Externalizable
{
     /**
      * @param tx Transaction.
      */
-    public IgniteTxProxyImpl(GridCacheTxEx<K, V> tx, GridCacheSharedContext<K, V>
cctx) {
+    public IgniteTxProxyImpl(IgniteTxEx<K, V> tx, GridCacheSharedContext<K, V>
cctx) {
         assert tx != null;
         assert cctx != null;
 
@@ -294,7 +294,7 @@ public class IgniteTxProxyImpl<K, V> implements IgniteTxProxy, Externalizable
{
 
     /** {@inheritDoc} */
     @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
-        tx = (GridCacheTxAdapter<K, V>)in.readObject();
+        tx = (IgniteTxAdapter<K, V>)in.readObject();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxRemoteEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxRemoteEx.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxRemoteEx.java
new file mode 100644
index 0000000..b90ee18
--- /dev/null
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxRemoteEx.java
@@ -0,0 +1,39 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.gridgain.grid.kernal.processors.cache.transactions;
+
+import org.gridgain.grid.kernal.processors.cache.*;
+
+import java.util.*;
+
+/**
+ * Local transaction API.
+ */
+public interface IgniteTxRemoteEx<K, V> extends IgniteTxEx<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(IgniteTxEntry<K, V> e);
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestEntryEx.java
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestEntryEx.java
index 73a5ed1..191d70c 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestEntryEx.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestEntryEx.java
@@ -12,6 +12,7 @@ package org.gridgain.grid.kernal.processors.cache;
 import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
 import org.gridgain.grid.cache.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.kernal.processors.dr.*;
 import org.gridgain.grid.util.lang.*;
 import org.gridgain.grid.util.typedef.*;
@@ -295,8 +296,8 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter
impleme
     }
 
     /** {@inheritDoc} */
-    @Override public GridCacheTxKey<K> txKey() {
-        return new GridCacheTxKey<>(key, 0);
+    @Override public IgniteTxKey<K> txKey() {
+        return new IgniteTxKey<>(key, 0);
     }
 
     /** @inheritDoc */
@@ -390,7 +391,7 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter
impleme
     }
 
     /** @inheritDoc */
-    @Override public V innerGet(@Nullable GridCacheTxEx<K, V> tx,
+    @Override public V innerGet(@Nullable IgniteTxEx<K, V> tx,
         boolean readSwap,
         boolean readThrough,
         boolean failFast,
@@ -411,7 +412,7 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter
impleme
     }
 
     /** @inheritDoc */
-    @Override public GridCacheUpdateTxResult<V> innerSet(@Nullable GridCacheTxEx<K,
V> tx, UUID evtNodeId, UUID affNodeId,
+    @Override public GridCacheUpdateTxResult<V> innerSet(@Nullable IgniteTxEx<K,
V> tx, UUID evtNodeId, UUID affNodeId,
         @Nullable V val, @Nullable byte[] valBytes, boolean writeThrough, boolean retval,
long ttl,
         boolean evt, boolean metrics, long topVer, IgnitePredicate<GridCacheEntry<K,
V>>[] filter, GridDrType drType,
         long drExpireTime, @Nullable GridCacheVersion drVer, UUID subjId, String taskName)
throws IgniteCheckedException,
@@ -439,7 +440,7 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter
impleme
     }
 
     /** @inheritDoc */
-    @Override public GridCacheUpdateTxResult<V> innerRemove(@Nullable GridCacheTxEx<K,
V> tx, UUID evtNodeId,
+    @Override public GridCacheUpdateTxResult<V> innerRemove(@Nullable IgniteTxEx<K,
V> tx, UUID evtNodeId,
         UUID affNodeId, boolean writeThrough, boolean retval, boolean evt, boolean metrics,
long topVer,
         IgnitePredicate<GridCacheEntry<K, V>>[] filter, GridDrType drType, @Nullable
GridCacheVersion drVer, UUID subjId,
         String taskName)
@@ -466,12 +467,12 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter
impleme
     }
 
     /** @inheritDoc */
-    @Override public boolean tmLock(GridCacheTxEx<K, V> tx, long timeout) {
+    @Override public boolean tmLock(IgniteTxEx<K, V> tx, long timeout) {
         assert false; return false;
     }
 
     /** @inheritDoc */
-    @Override public void txUnlock(GridCacheTxEx<K, V> tx) {
+    @Override public void txUnlock(IgniteTxEx<K, V> tx) {
         assert false;
     }
 
@@ -543,7 +544,7 @@ public class GridCacheTestEntryEx<K, V> extends GridMetadataAwareAdapter
impleme
 
     /** @inheritDoc */
     @Override public GridTuple<V> peek0(boolean failFast, GridCachePeekMode mode,
-        IgnitePredicate<GridCacheEntry<K, V>>[] filter, GridCacheTxEx<K, V>
tx)
+        IgnitePredicate<GridCacheEntry<K, V>>[] filter, IgniteTxEx<K, V>
tx)
         throws GridCacheEntryRemovedException, GridCacheFilterFailedException, IgniteCheckedException
{
         return F.t(val);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestStore.java
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestStore.java
index bae49d7..133c773 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestStore.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestStore.java
@@ -13,6 +13,7 @@ import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.store.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
@@ -304,7 +305,7 @@ public final class GridCacheTestStore implements GridCacheStore<Integer,
String>
 
         txs.add(tx);
 
-        GridCacheTxEx tx0 = (GridCacheTxEx)tx;
+        IgniteTxEx tx0 = (IgniteTxEx)tx;
 
         if (!tx0.local())
             throw new IgniteCheckedException("Tx is not local: " + tx);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
index 5e0560e..d5f91c0 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
@@ -150,7 +150,7 @@ public abstract class IgniteTxOriginatingNodeFailureAbstractSelfTest extends
Gri
 
                 IgniteTxProxyImpl tx = (IgniteTxProxyImpl)cache.txStart();
 
-                GridCacheTxEx txEx = GridTestUtils.getFieldValue(tx, "tx");
+                IgniteTxEx txEx = GridTestUtils.getFieldValue(tx, "tx");
 
                 cache.putAll(map);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
index 1b898fc..2f04b85 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
@@ -22,6 +22,7 @@ import org.gridgain.grid.kernal.managers.communication.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.near.*;
 import org.apache.ignite.spi.communication.tcp.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.direct.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.lang.*;
@@ -204,7 +205,7 @@ public abstract class IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest
                 for (GridKernal g : grids) {
                     GridCacheAdapter<?, ?> cache = g.internalCache();
 
-                    GridCacheTxManager txMgr = cache.isNear() ?
+                    IgniteTxManager txMgr = cache.isNear() ?
                         ((GridNearCacheAdapter)cache).dht().context().tm() :
                         cache.context().tm();
 
@@ -335,7 +336,7 @@ public abstract class IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest
                 for (GridKernal g : grids) {
                     GridCacheAdapter<?, ?> cache = g.internalCache();
 
-                    GridCacheTxManager txMgr = cache.isNear() ?
+                    IgniteTxManager txMgr = cache.isNear() ?
                         ((GridNearCacheAdapter)cache).dht().context().tm() :
                         cache.context().tm();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridCacheAtomicPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridCacheAtomicPreloadSelfTest.java
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridCacheAtomicPreloadSelfTest.java
index 2f02df0..f39a0f5 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridCacheAtomicPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/atomic/GridCacheAtomicPreloadSelfTest.java
@@ -16,7 +16,7 @@ import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.affinity.*;
 import org.gridgain.grid.kernal.*;
-import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.testframework.junits.common.*;
 
 import java.util.*;
@@ -141,7 +141,7 @@ public class GridCacheAtomicPreloadSelfTest extends GridCommonAbstractTest
{
      */
     private void checkTransactions() {
         for (int i = 0; i < 3; i++) {
-            GridCacheTxManager<Object, Object> tm = ((GridKernal)grid(i)).context().cache().context().tm();
+            IgniteTxManager<Object, Object> tm = ((GridKernal)grid(i)).context().cache().context().tm();
 
             assertEquals("Uncommitted transactions found on node [idx=" + i + ", mapSize="
+ tm.idMapSize() + ']',
                 0, tm.idMapSize());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java
index e3aadeae..a966105 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java
@@ -16,11 +16,11 @@ import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.affinity.*;
 import org.gridgain.grid.kernal.*;
-import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.testframework.junits.common.*;
 
@@ -225,13 +225,13 @@ public class GridCacheNearTxMultiNodeSelfTest extends GridCommonAbstractTest
{
      * @param tm Transaction manager.
      */
     @SuppressWarnings( {"unchecked"})
-    private void checkTm(Ignite g, GridCacheTxManager tm) {
-        Collection<GridCacheTxEx> txs = tm.txs();
+    private void checkTm(Ignite g, IgniteTxManager tm) {
+        Collection<IgniteTxEx> txs = tm.txs();
 
         info(">>> Number of transactions in the set [size=" + txs.size() +
             ", nodeId=" + g.cluster().localNode().id() + ']');
 
-        for (GridCacheTxEx tx : txs)
+        for (IgniteTxEx tx : txs)
             assert tx.done() : "Transaction is not finished: " + tx;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
index 0b56ca5..7d1e816 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
@@ -20,6 +20,7 @@ import org.gridgain.grid.kernal.processors.cache.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.gridgain.testframework.junits.common.*;
 
@@ -133,7 +134,7 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes
      *
      * @param mode Transaction mode (PESSIMISTIC, OPTIMISTIC).
      * @param prepare Whether to preapre transaction state
-     *                (i.e. call {@link GridCacheTxEx#prepare()}).
+     *                (i.e. call {@link IgniteTxEx#prepare()}).
      * @throws Exception If failed.
      */
     private void checkSalvageAfterTimeout(IgniteTxConcurrency mode, boolean prepare) throws
Exception {
@@ -152,7 +153,7 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes
      *
      * @param mode Transaction mode (PESSIMISTIC, OPTIMISTIC).
      * @param prepare Whether to preapre transaction state
-     *                (i.e. call {@link GridCacheTxEx#prepare()}).
+     *                (i.e. call {@link IgniteTxEx#prepare()}).
      * @throws Exception If failed.
      */
     private void checkSalvageBeforeTimeout(IgniteTxConcurrency mode, boolean prepare) throws
Exception {
@@ -179,7 +180,7 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes
      *
      * @param mode Transaction mode (PESSIMISTIC, OPTIMISTIC).
      * @param prepare Whether to preapre transaction state
-     *                (i.e. call {@link GridCacheTxEx#prepare()}).
+     *                (i.e. call {@link IgniteTxEx#prepare()}).
      * @throws Exception If failed.
      */
     private void startTxAndPutKeys(final IgniteTxConcurrency mode, final boolean prepare)
throws Exception {
@@ -199,7 +200,7 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes
 
                     // Unproxy.
                     if (prepare)
-                        U.<GridCacheTxEx>field(tx, "tx").prepare();
+                        U.<IgniteTxEx>field(tx, "tx").prepare();
                 }
                 catch (IgniteCheckedException e) {
                     info("Failed to put keys to cache: " + e.getMessage());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManagerSelfTest.java
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManagerSelfTest.java
index 565b423..4019b28 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManagerSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManagerSelfTest.java
@@ -18,6 +18,7 @@ import org.gridgain.grid.kernal.processors.cache.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.gridgain.testframework.*;
@@ -181,7 +182,7 @@ public class GridGgfsDataManagerSelfTest extends GridGgfsCommonAbstractTest
{
             for (int j = 0; j < NODES_CNT; j++) {
                 GridCacheContext<Object, Object> ctx = GridTestUtils.getFieldValue(grid(j).cachex(DATA_CACHE_NAME),
                     "ctx");
-                Collection<GridCacheTxEx<Object, Object>> txs = ctx.tm().txs();
+                Collection<IgniteTxEx<Object, Object>> txs = ctx.tm().txs();
 
                 assert txs.isEmpty() : "Incomplete transactions: " + txs;
             }
@@ -269,7 +270,7 @@ public class GridGgfsDataManagerSelfTest extends GridGgfsCommonAbstractTest
{
             for (int j = 0; j < NODES_CNT; j++) {
                 GridCacheContext<Object, Object> ctx = GridTestUtils.getFieldValue(grid(j).cachex(DATA_CACHE_NAME),
                     "ctx");
-                Collection<GridCacheTxEx<Object, Object>> txs = ctx.tm().txs();
+                Collection<IgniteTxEx<Object, Object>> txs = ctx.tm().txs();
 
                 assert txs.isEmpty() : "Incomplete transactions: " + txs;
             }
@@ -349,7 +350,7 @@ public class GridGgfsDataManagerSelfTest extends GridGgfsCommonAbstractTest
{
             for (int j = 0; j < NODES_CNT; j++) {
                 GridCacheContext<Object, Object> ctx = GridTestUtils.getFieldValue(grid(j).cachex(DATA_CACHE_NAME),
                     "ctx");
-                Collection<GridCacheTxEx<Object, Object>> txs = ctx.tm().txs();
+                Collection<IgniteTxEx<Object, Object>> txs = ctx.tm().txs();
 
                 assert txs.isEmpty() : "Incomplete transactions: " + txs;
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/test/java/org/gridgain/loadtests/hashmap/GridCacheTestContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/hashmap/GridCacheTestContext.java
b/modules/core/src/test/java/org/gridgain/loadtests/hashmap/GridCacheTestContext.java
index 3236e99..adae929 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/hashmap/GridCacheTestContext.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/hashmap/GridCacheTestContext.java
@@ -15,8 +15,8 @@ import org.gridgain.grid.kernal.processors.cache.dr.os.*;
 import org.gridgain.grid.kernal.processors.cache.jta.*;
 import org.gridgain.grid.kernal.processors.cache.query.*;
 import org.gridgain.grid.kernal.processors.cache.query.continuous.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.testframework.junits.*;
-import org.gridgain.testframework.junits.logger.*;
 
 import static org.gridgain.testframework.junits.GridAbstractTest.*;
 
@@ -32,7 +32,7 @@ public class GridCacheTestContext<K, V> extends GridCacheContext<K,
V> {
             ctx,
             new GridCacheSharedContext<>(
                 ctx,
-                new GridCacheTxManager<K, V>(),
+                new IgniteTxManager<K, V>(),
                 new GridCacheVersionManager<K, V>(),
                 new GridCacheMvccManager<K, V>(),
                 new GridCacheDeploymentManager<K, V>(),

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/core/src/test/java/org/gridgain/loadtests/hashmap/GridHashMapLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/hashmap/GridHashMapLoadTest.java
b/modules/core/src/test/java/org/gridgain/loadtests/hashmap/GridHashMapLoadTest.java
index 87d8dae..a64a733 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/hashmap/GridHashMapLoadTest.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/hashmap/GridHashMapLoadTest.java
@@ -10,6 +10,7 @@
 package org.gridgain.loadtests.hashmap;
 
 import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.testframework.junits.*;
 import org.gridgain.testframework.junits.common.*;
 import org.gridgain.testframework.junits.logger.*;
@@ -63,11 +64,11 @@ public class GridHashMapLoadTest extends GridCommonAbstractTest {
 
             map.put(key, new GridCacheMapEntry<Integer, Integer>(ctx, key,
                 key.hashCode(), val, null, 0, 1) {
-                @Override public boolean tmLock(GridCacheTxEx<Integer, Integer> tx,
long timeout) {
+                @Override public boolean tmLock(IgniteTxEx<Integer, Integer> tx, long
timeout) {
                     return false;
                 }
 
-                @Override public void txUnlock(GridCacheTxEx<Integer, Integer> tx)
{
+                @Override public void txUnlock(IgniteTxEx<Integer, Integer> tx) {
                     // No-op.
                 }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/jta/src/main/java/org/gridgain/grid/kernal/processors/cache/jta/GridCacheJtaManager.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/gridgain/grid/kernal/processors/cache/jta/GridCacheJtaManager.java
b/modules/jta/src/main/java/org/gridgain/grid/kernal/processors/cache/jta/GridCacheJtaManager.java
index f944b38..9fd4ba2 100644
--- a/modules/jta/src/main/java/org/gridgain/grid/kernal/processors/cache/jta/GridCacheJtaManager.java
+++ b/modules/jta/src/main/java/org/gridgain/grid/kernal/processors/cache/jta/GridCacheJtaManager.java
@@ -14,7 +14,7 @@ import org.apache.ignite.configuration.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.jta.*;
-import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.jetbrains.annotations.*;
 
 import javax.transaction.*;
@@ -80,7 +80,7 @@ public class GridCacheJtaManager<K, V> extends GridCacheJtaManagerAdapter<K,
V>
                             );
                         }
 
-                        rsrc = new GridCacheXAResource((GridCacheTxEx)tx, cctx);
+                        rsrc = new GridCacheXAResource((IgniteTxEx)tx, cctx);
 
                         if (!jtaTx.enlistResource(rsrc))
                             throw new IgniteCheckedException("Failed to enlist XA resource
to JTA user transaction.");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd46f567/modules/jta/src/main/java/org/gridgain/grid/kernal/processors/cache/jta/GridCacheXAResource.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/gridgain/grid/kernal/processors/cache/jta/GridCacheXAResource.java
b/modules/jta/src/main/java/org/gridgain/grid/kernal/processors/cache/jta/GridCacheXAResource.java
index 58c9ce3..bc6dea4 100644
--- a/modules/jta/src/main/java/org/gridgain/grid/kernal/processors/cache/jta/GridCacheXAResource.java
+++ b/modules/jta/src/main/java/org/gridgain/grid/kernal/processors/cache/jta/GridCacheXAResource.java
@@ -12,6 +12,7 @@ package org.gridgain.grid.kernal.processors.cache.jta;
 import org.apache.ignite.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.typedef.internal.*;
 
 import javax.transaction.xa.*;
@@ -33,7 +34,7 @@ public final class GridCacheXAResource implements XAResource {
     private GridCacheContext cctx;
 
     /** Cache transaction. */
-    private GridCacheTxEx cacheTx;
+    private IgniteTxEx cacheTx;
 
     /** */
     private IgniteLogger log;
@@ -45,7 +46,7 @@ public final class GridCacheXAResource implements XAResource {
      * @param cacheTx Cache jta.
      * @param cctx Cache context.
      */
-    public GridCacheXAResource(GridCacheTxEx cacheTx, GridCacheContext cctx) {
+    public GridCacheXAResource(IgniteTxEx cacheTx, GridCacheContext cctx) {
         assert cacheTx != null;
         assert cctx != null;
 


Mime
View raw message