ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/5] ignite git commit: ignite-4768 txs
Date Tue, 14 Mar 2017 15:16:03 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-4768-1 [created] 5523eac7d


http://git-wip-us.apache.org/repos/asf/ignite/blob/5523eac7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
index f5687a0..0cf1d67 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
@@ -18,18 +18,12 @@
 package org.apache.ignite.internal.processors.cache.transactions;
 
 import java.util.Collection;
-import java.util.Map;
-import javax.cache.Cache;
 import javax.cache.expiry.ExpiryPolicy;
-import javax.cache.processor.EntryProcessor;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
-import org.apache.ignite.internal.processors.cache.CacheEntryPredicate;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
-import org.apache.ignite.internal.processors.cache.GridCacheReturn;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
-import org.apache.ignite.internal.processors.cache.dr.GridCacheDrInfo;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.util.lang.GridInClosure3;
 import org.jetbrains.annotations.Nullable;
@@ -59,113 +53,6 @@ public interface IgniteTxLocalEx extends IgniteInternalTx {
     public void userRollback() throws IgniteCheckedException;
 
     /**
-     * @param cacheCtx Cache context.
-     * @param keys Keys to get.
-     * @param deserializeBinary Deserialize binary flag.
-     * @param skipVals Skip values flag.
-     * @param keepCacheObjects Keep cache objects
-     * @param skipStore Skip store flag.
-     * @return Future for this get.
-     */
-    public <K, V> IgniteInternalFuture<Map<K, V>> getAllAsync(
-        GridCacheContext cacheCtx,
-        @Nullable AffinityTopologyVersion entryTopVer,
-        Collection<KeyCacheObject> keys,
-        boolean deserializeBinary,
-        boolean skipVals,
-        boolean keepCacheObjects,
-        boolean skipStore,
-        boolean needVer);
-
-    /**
-     * @param cacheCtx Cache context.
-     * @param map Map to put.
-     * @param retval Flag indicating whether a value should be returned.
-     * @return Future for put operation.
-     */
-    public <K, V> IgniteInternalFuture<GridCacheReturn> putAllAsync(
-        GridCacheContext cacheCtx,
-        @Nullable AffinityTopologyVersion entryTopVer,
-        Map<? extends K, ? extends V> map,
-        boolean retval);
-
-    /**
-     * @param cacheCtx Cache context.
-     * @param key Key.
-     * @param val Value.
-     * @param retval Return value flag.
-     * @param filter Filter.
-     * @return Future for put operation.
-     */
-    public <K, V> IgniteInternalFuture<GridCacheReturn> putAsync(
-        GridCacheContext cacheCtx,
-        @Nullable AffinityTopologyVersion entryTopVer,
-        K key,
-        V val,
-        boolean retval,
-        CacheEntryPredicate filter);
-
-    /**
-     * @param cacheCtx Cache context.
-     * @param key Key.
-     * @param entryProcessor Entry processor.
-     * @param invokeArgs Optional arguments for entry processor.
-     * @return Operation future.
-     */
-    public <K, V> IgniteInternalFuture<GridCacheReturn> invokeAsync(
-        GridCacheContext cacheCtx,
-        @Nullable AffinityTopologyVersion entryTopVer,
-        K key,
-        EntryProcessor<K, V, Object> entryProcessor,
-        Object... invokeArgs);
-
-    /**
-     * @param cacheCtx Cache context.
-     * @param map Entry processors map.
-     * @param invokeArgs Optional arguments for entry processor.
-     * @return Operation future.
-     */
-    public <K, V, T> IgniteInternalFuture<GridCacheReturn> invokeAsync(
-        GridCacheContext cacheCtx,
-        @Nullable AffinityTopologyVersion entryTopVer,
-        Map<? extends K, ? extends EntryProcessor<K, V, Object>> map,
-        Object... invokeArgs);
-
-    /**
-     * @param cacheCtx Cache context.
-     * @param keys Keys to remove.
-     * @param retval Flag indicating whether a value should be returned.
-     * @param filter Filter.
-     * @param singleRmv {@code True} for single key remove operation ({@link Cache#remove(Object)}.
-     * @return Future for asynchronous remove.
-     */
-    public <K, V> IgniteInternalFuture<GridCacheReturn> removeAllAsync(
-        GridCacheContext cacheCtx,
-        @Nullable AffinityTopologyVersion entryTopVer,
-        Collection<? extends K> keys,
-        boolean retval,
-        CacheEntryPredicate filter,
-        boolean singleRmv);
-
-    /**
-     * @param cacheCtx Cache context.
-     * @param drMap DR map to put.
-     * @return Future for DR put operation.
-     */
-    public IgniteInternalFuture<?> putAllDrAsync(
-        GridCacheContext cacheCtx,
-        Map<KeyCacheObject, GridCacheDrInfo> drMap);
-
-    /**
-     * @param cacheCtx Cache context.
-     * @param drMap DR map.
-     * @return Future for asynchronous remove.
-     */
-    public IgniteInternalFuture<?> removeAllDrAsync(
-        GridCacheContext cacheCtx,
-        Map<KeyCacheObject, GridCacheVersion> drMap);
-
-    /**
      * Finishes transaction (either commit or rollback).
      *
      * @param commit {@code True} if commit, {@code false} if rollback.
@@ -173,27 +60,4 @@ public interface IgniteTxLocalEx extends IgniteInternalTx {
      * @throws IgniteCheckedException If finish failed.
      */
     public boolean finish(boolean commit) throws IgniteCheckedException;
-
-    /**
-     * @param cacheCtx  Cache context.
-     * @param readThrough Read through flag.
-     * @param async if {@code True}, then loading will happen in a separate thread.
-     * @param keys Keys.
-     * @param skipVals Skip values flag.
-     * @param needVer If {@code true} version is required for loaded values.
-     * @param c Closure to be applied for loaded values.
-     * @param expiryPlc Expiry policy.
-     * @return Future with {@code True} value if loading took place.
-     */
-    public IgniteInternalFuture<Void> loadMissing(
-        GridCacheContext cacheCtx,
-        AffinityTopologyVersion topVer,
-        boolean readThrough,
-        boolean async,
-        Collection<KeyCacheObject> keys,
-        boolean skipVals,
-        boolean needVer,
-        boolean keepBinary,
-        final ExpiryPolicy expiryPlc,
-        GridInClosure3<KeyCacheObject, Object, GridCacheVersion> c);
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5523eac7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
index df3bad2..ff4a4e6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
@@ -206,54 +206,6 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
     private TxDeadlockDetection txDeadlockDetection;
 
     /** {@inheritDoc} */
-    @Override protected void onKernalStart0(boolean reconnect) {
-        if (reconnect)
-            return;
-
-        cctx.gridEvents().addLocalEventListener(
-            new GridLocalEventListener() {
-                @Override public void onEvent(Event evt) {
-                    assert evt instanceof DiscoveryEvent;
-                    assert evt.type() == EVT_NODE_FAILED || evt.type() == EVT_NODE_LEFT;
-
-                    DiscoveryEvent discoEvt = (DiscoveryEvent)evt;
-
-                    UUID nodeId = discoEvt.eventNode().id();
-
-                    cctx.time().addTimeoutObject(new NodeFailureTimeoutObject(nodeId));
-
-                    if (txFinishSync != null)
-                        txFinishSync.onNodeLeft(nodeId);
-
-                    for (TxDeadlockFuture fut : deadlockDetectFuts.values())
-                        fut.onNodeLeft(nodeId);
-
-                    for (Map.Entry<GridCacheVersion, Object> entry : completedVersHashMap.entrySet())
{
-                        Object obj = entry.getValue();
-
-                        if (obj instanceof GridCacheReturnCompletableWrapper &&
-                            nodeId.equals(((GridCacheReturnCompletableWrapper)obj).nodeId()))
-                            removeTxReturn(entry.getKey());
-                    }
-                }
-            },
-            EVT_NODE_FAILED, EVT_NODE_LEFT);
-
-        this.txDeadlockDetection = new TxDeadlockDetection(cctx);
-
-        cctx.gridIO().addMessageListener(TOPIC_TX, new DeadlockDetectionListener());
-
-        for (IgniteInternalTx tx : idMap.values()) {
-            if ((!tx.local() || tx.dht()) && !cctx.discovery().aliveAll(tx.masterNodeIds()))
{
-                if (log.isDebugEnabled())
-                    log.debug("Remaining transaction from left node: " + tx);
-
-                salvageTx(tx, true, USER_FINISH);
-            }
-        }
-    }
-
-    /** {@inheritDoc} */
     @Override protected void onKernalStop0(boolean cancel) {
         cctx.gridIO().removeMessageListener(TOPIC_TX);
     }
@@ -293,6 +245,39 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
                 }
             }
         };
+
+        cctx.gridEvents().addLocalEventListener(
+            new GridLocalEventListener() {
+                @Override public void onEvent(Event evt) {
+                    assert evt instanceof DiscoveryEvent;
+                    assert evt.type() == EVT_NODE_FAILED || evt.type() == EVT_NODE_LEFT;
+
+                    DiscoveryEvent discoEvt = (DiscoveryEvent)evt;
+
+                    UUID nodeId = discoEvt.eventNode().id();
+
+                    cctx.time().addTimeoutObject(new NodeFailureTimeoutObject(nodeId));
+
+                    if (txFinishSync != null)
+                        txFinishSync.onNodeLeft(nodeId);
+
+                    for (TxDeadlockFuture fut : deadlockDetectFuts.values())
+                        fut.onNodeLeft(nodeId);
+
+                    for (Map.Entry<GridCacheVersion, Object> entry : completedVersHashMap.entrySet())
{
+                        Object obj = entry.getValue();
+
+                        if (obj instanceof GridCacheReturnCompletableWrapper &&
+                            nodeId.equals(((GridCacheReturnCompletableWrapper)obj).nodeId()))
+                            removeTxReturn(entry.getKey());
+                    }
+                }
+            },
+            EVT_NODE_FAILED, EVT_NODE_LEFT);
+
+        this.txDeadlockDetection = new TxDeadlockDetection(cctx);
+
+        cctx.gridIO().addMessageListener(TOPIC_TX, new DeadlockDetectionListener());
     }
 
     /** {@inheritDoc} */
@@ -461,7 +446,7 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
      * @param txSize Expected transaction size.
      * @return New transaction.
      */
-    public IgniteTxLocalAdapter newTx(
+    public GridNearTxLocal newTx(
         boolean implicit,
         boolean implicitSingle,
         @Nullable GridCacheContext sysCacheCtx,
@@ -672,13 +657,19 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
     }
 
     /**
+     * @param cctx Cache context.
      * @return Transaction for current thread.
      */
-    @SuppressWarnings({"unchecked"})
-    public <T> T threadLocalTx(GridCacheContext cctx) {
+    public GridNearTxLocal threadLocalTx(GridCacheContext cctx) {
         IgniteInternalTx tx = tx(cctx, Thread.currentThread().getId());
 
-        return tx != null && tx.local() && (!tx.dht() || tx.colocated())
&& !tx.implicit() ? (T)tx : null;
+        if (tx != null && tx.local() && (!tx.dht() || tx.colocated()) &&
!tx.implicit()) {
+            assert tx instanceof GridNearTxLocal : tx;
+
+            return (GridNearTxLocal)tx;
+        }
+
+        return null;
     }
 
     /**
@@ -747,48 +738,53 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
      * @return Local transaction.
      */
     @Nullable public IgniteInternalTx localTxx() {
-        IgniteInternalTx tx = txx();
+        IgniteInternalTx tx = tx();
 
         return tx != null && tx.local() ? tx : null;
     }
 
     /**
-     * @return Transaction for current thread.
-     */
-    @SuppressWarnings({"unchecked"})
-    public IgniteInternalTx txx() {
-        return tx();
-    }
-
-    /**
      * @return User transaction for current thread.
      */
-    @Nullable public IgniteInternalTx userTx() {
+    @Nullable public GridNearTxLocal userTx() {
         IgniteInternalTx tx = txContext();
 
-        if (tx != null && tx.user() && tx.state() == ACTIVE)
-            return tx;
+        if (activeUserTx(tx))
+            return (GridNearTxLocal)tx;
 
         tx = tx(null, Thread.currentThread().getId());
 
-        return tx != null && tx.user() && tx.state() == ACTIVE ? tx : null;
+        if (activeUserTx(tx))
+            return (GridNearTxLocal)tx;
+
+        return null;
     }
 
     /**
+     * @param cctx Cache context.
      * @return User transaction for current thread.
      */
-    @Nullable public IgniteInternalTx userTx(GridCacheContext cctx) {
+    @Nullable GridNearTxLocal userTx(GridCacheContext cctx) {
         IgniteInternalTx tx = tx(cctx, Thread.currentThread().getId());
 
-        return tx != null && tx.user() && tx.state() == ACTIVE ? tx : null;
+        if (activeUserTx(tx))
+            return (GridNearTxLocal)tx;
+
+        return null;
     }
 
     /**
-     * @return User transaction.
+     * @param tx Transaction.
+     * @return {@code True} if given transaction is explicitly started user transaction.
      */
-    @SuppressWarnings({"unchecked"})
-    @Nullable public <T extends IgniteTxLocalEx> T userTxx() {
-        return (T)userTx();
+    private boolean activeUserTx(@Nullable IgniteInternalTx tx) {
+        if (tx != null && tx.user() && tx.state() == ACTIVE) {
+            assert tx instanceof GridNearTxLocal : tx;
+
+            return true;
+        }
+
+        return false;
     }
 
     /**
@@ -1984,7 +1980,9 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
         if (tx instanceof GridDistributedTxRemoteAdapter) {
             IgniteTxRemoteEx rmtTx = (IgniteTxRemoteEx)tx;
 
-            rmtTx.doneRemote(tx.xidVersion(), Collections.<GridCacheVersion>emptyList(),
Collections.<GridCacheVersion>emptyList(),
+            rmtTx.doneRemote(tx.xidVersion(),
+                Collections.<GridCacheVersion>emptyList(),
+                Collections.<GridCacheVersion>emptyList(),
                 Collections.<GridCacheVersion>emptyList());
         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/5523eac7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TransactionProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TransactionProxyImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TransactionProxyImpl.java
index 6134b9f..8ffec00 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TransactionProxyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TransactionProxyImpl.java
@@ -26,6 +26,7 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteClientDisconnectedException;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal;
 import org.apache.ignite.internal.util.future.IgniteFinishedFutureImpl;
 import org.apache.ignite.internal.util.future.IgniteFutureImpl;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
@@ -51,7 +52,7 @@ public class TransactionProxyImpl<K, V> implements TransactionProxy,
Externaliza
 
     /** Wrapped transaction. */
     @GridToStringInclude
-    private IgniteInternalTx tx;
+    private GridNearTxLocal tx;
 
     /** Gateway. */
     @GridToStringExclude
@@ -75,7 +76,7 @@ public class TransactionProxyImpl<K, V> implements TransactionProxy,
Externaliza
      * @param cctx Shared context.
      * @param async Async flag.
      */
-    public TransactionProxyImpl(IgniteInternalTx tx, GridCacheSharedContext<K, V> cctx,
boolean async) {
+    public TransactionProxyImpl(GridNearTxLocal tx, GridCacheSharedContext<K, V> cctx,
boolean async) {
         assert tx != null;
         assert cctx != null;
 
@@ -87,7 +88,7 @@ public class TransactionProxyImpl<K, V> implements TransactionProxy,
Externaliza
     /**
      * @return Transaction.
      */
-    public IgniteInternalTx tx() {
+    public GridNearTxLocal tx() {
         return tx;
     }
 
@@ -316,7 +317,9 @@ public class TransactionProxyImpl<K, V> implements TransactionProxy,
Externaliza
     private void saveFuture(IgniteInternalFuture<IgniteInternalTx> fut) {
         IgniteInternalFuture<Transaction> fut0 = fut.chain(new CX1<IgniteInternalFuture<IgniteInternalTx>,
Transaction>() {
             @Override public Transaction applyx(IgniteInternalFuture<IgniteInternalTx>
fut) throws IgniteCheckedException {
-                return fut.get().proxy();
+                fut.get();
+
+                return TransactionProxyImpl.this;
             }
         });
 
@@ -330,7 +333,7 @@ public class TransactionProxyImpl<K, V> implements TransactionProxy,
Externaliza
 
     /** {@inheritDoc} */
     @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
-        tx = (IgniteInternalTx)in.readObject();
+        tx = (GridNearTxLocal)in.readObject();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/5523eac7/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateReadWriteAccessStrategy.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateReadWriteAccessStrategy.java
b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateReadWriteAccessStrategy.java
index bbb1d4e..77a8d36 100644
--- a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateReadWriteAccessStrategy.java
+++ b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateReadWriteAccessStrategy.java
@@ -22,6 +22,7 @@ import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.internal.processors.cache.IgniteInternalCache;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal;
 import org.apache.ignite.internal.util.GridLeanSet;
 import org.apache.ignite.transactions.Transaction;
 import org.hibernate.cache.CacheException;
@@ -250,15 +251,15 @@ public class HibernateReadWriteAccessStrategy extends HibernateAccessStrategyAda
         if (ctx.unlocked(key)) { // Finish transaction if last key is unlocked.
             txCtx.remove();
 
-            Transaction tx = cache.tx();
+            GridNearTxLocal tx = cache.tx();
 
             assert tx != null;
 
             try {
-                tx.commit();
+                tx.proxy().commit();
             }
             finally {
-                tx.close();
+                tx.proxy().close();
             }
 
             assert cache.tx() == null;
@@ -275,10 +276,10 @@ public class HibernateReadWriteAccessStrategy extends HibernateAccessStrategyAda
             if (ctx != null) {
                 txCtx.remove();
 
-                Transaction tx = cache.tx();
+                GridNearTxLocal tx = cache.tx();
 
                 if (tx != null)
-                    tx.rollback();
+                    tx.proxy().rollback();
             }
         }
         catch (IgniteException e) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/5523eac7/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
index f581ebb..5047491 100644
--- a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
+++ b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
@@ -27,6 +27,7 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.cache.jta.CacheTmLookup;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.TransactionConfiguration;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
 import org.apache.ignite.lifecycle.LifecycleAware;
 import org.jetbrains.annotations.Nullable;
@@ -151,7 +152,7 @@ public class CacheJtaManager extends CacheJtaManagerAdapter {
                     Transaction jtaTx = jtaTm.getTransaction();
 
                     if (jtaTx != null) {
-                        IgniteInternalTx tx = cctx.tm().userTx();
+                        GridNearTxLocal tx = cctx.tm().userTx();
 
                         if (tx == null) {
                             TransactionConfiguration tCfg = cctx.kernalContext().config()

http://git-wip-us.apache.org/repos/asf/ignite/blob/5523eac7/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaResource.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaResource.java
b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaResource.java
index f43981e..611a366 100644
--- a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaResource.java
+++ b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaResource.java
@@ -27,6 +27,7 @@ import javax.transaction.xa.Xid;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.internal.GridKernalContext;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
@@ -51,7 +52,7 @@ final class CacheJtaResource implements XAResource, Synchronization {
     private static final Xid[] NO_XID = new Xid[] {};
 
     /** Cache transaction. */
-    private IgniteInternalTx cacheTx;
+    private GridNearTxLocal cacheTx;
 
     /** */
     private Xid xid;
@@ -60,7 +61,7 @@ final class CacheJtaResource implements XAResource, Synchronization {
      * @param cacheTx Cache jta.
      * @param ctx Kernal context.
      */
-    public CacheJtaResource(IgniteInternalTx cacheTx, GridKernalContext ctx) {
+    CacheJtaResource(GridNearTxLocal cacheTx, GridKernalContext ctx) {
         assert cacheTx != null;
         assert ctx != null;
 
@@ -291,7 +292,7 @@ final class CacheJtaResource implements XAResource, Synchronization {
      *
      * @return {@code true} if jta was already committed or rolled back.
      */
-    public boolean isFinished() {
+    boolean isFinished() {
         TransactionState state = cacheTx.state();
 
         return state == COMMITTED || state == ROLLED_BACK;


Mime
View raw message