ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [26/53] [abbrv] incubator-ignite git commit: GG-9141 - Renaming.
Date Tue, 23 Dec 2014 20:36:09 GMT
GG-9141 - Renaming.


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

Branch: refs/heads/ignite-gg9499
Commit: 8365bb3dc0444b1e0b226801c04af023fc4efcdc
Parents: 301a006
Author: Alexey Goncharuk <agoncharuk@gridgain.com>
Authored: Fri Dec 19 18:43:12 2014 -0800
Committer: Alexey Goncharuk <agoncharuk@gridgain.com>
Committed: Fri Dec 19 18:43:12 2014 -0800

----------------------------------------------------------------------
 .../processors/cache/GridCacheAdapter.java      |   1 +
 .../cache/GridCacheSharedContext.java           |   1 +
 .../kernal/processors/cache/IgniteTxProxy.java  |  19 --
 .../processors/cache/IgniteTxProxyImpl.java     | 303 ------------------
 .../transactions/IgniteTxMetricsAdapter.java    | 108 +++++++
 .../cache/transactions/IgniteTxProxy.java       |  19 ++
 .../cache/transactions/IgniteTxProxyImpl.java   | 304 +++++++++++++++++++
 ...xOriginatingNodeFailureAbstractSelfTest.java |   1 +
 8 files changed, 434 insertions(+), 322 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8365bb3d/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
index 643ec03..3a6d702 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
@@ -30,6 +30,7 @@ import org.gridgain.grid.kernal.processors.cache.datastructures.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
 import org.gridgain.grid.kernal.processors.cache.dr.*;
 import org.gridgain.grid.kernal.processors.cache.query.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.kernal.processors.dr.*;
 import org.gridgain.grid.kernal.processors.task.*;
 import org.gridgain.grid.util.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8365bb3d/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheSharedContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheSharedContext.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheSharedContext.java
index 0effe1b..7912b69 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheSharedContext.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheSharedContext.java
@@ -21,6 +21,7 @@ import org.gridgain.grid.kernal.managers.communication.*;
 import org.gridgain.grid.kernal.managers.deployment.*;
 import org.gridgain.grid.kernal.managers.discovery.*;
 import org.gridgain.grid.kernal.managers.eventstorage.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.kernal.processors.timeout.*;
 import org.gridgain.grid.util.future.*;
 import org.gridgain.grid.util.typedef.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8365bb3d/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/IgniteTxProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/IgniteTxProxy.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/IgniteTxProxy.java
deleted file mode 100644
index 19c8116..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/IgniteTxProxy.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.kernal.processors.cache;
-
-import org.apache.ignite.transactions.*;
-
-/**
- * Marker interface for transaction proxy.
- */
-public interface IgniteTxProxy extends IgniteTx {
-    // No-op.
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8365bb3d/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/IgniteTxProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/IgniteTxProxyImpl.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/IgniteTxProxyImpl.java
deleted file mode 100644
index 7d43bc4..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/IgniteTxProxyImpl.java
+++ /dev/null
@@ -1,303 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.kernal.processors.cache;
-
-import org.apache.ignite.*;
-import org.apache.ignite.lang.*;
-import org.apache.ignite.transactions.*;
-import org.gridgain.grid.*;
-import org.gridgain.grid.util.tostring.*;
-import org.gridgain.grid.util.typedef.internal.*;
-import org.jetbrains.annotations.*;
-
-import java.io.*;
-import java.util.*;
-import java.util.concurrent.*;
-
-/**
- * Cache transaction proxy.
- */
-public class IgniteTxProxyImpl<K, V> implements IgniteTxProxy, Externalizable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Wrapped transaction. */
-    @GridToStringInclude
-    private GridCacheTxEx<K, V> tx;
-
-    /** Gateway. */
-    @GridToStringExclude
-    private GridCacheSharedContext<K, V> cctx;
-
-    /**
-     * Empty constructor required for {@link Externalizable}.
-     */
-    public IgniteTxProxyImpl() {
-        // No-op.
-    }
-
-    /**
-     * @param tx Transaction.
-     */
-    public IgniteTxProxyImpl(GridCacheTxEx<K, V> tx, GridCacheSharedContext<K, V>
cctx) {
-        assert tx != null;
-        assert cctx != null;
-
-        this.tx = tx;
-        this.cctx = cctx;
-    }
-
-    /**
-     * Enters a call.
-     */
-    private void enter() {
-        if (cctx.deploymentEnabled())
-            cctx.deploy().onEnter();
-
-        try {
-            cctx.kernalContext().gateway().readLock();
-        }
-        catch (IllegalStateException e) {
-            throw e;
-        }
-        catch (RuntimeException | Error e) {
-            cctx.kernalContext().gateway().readUnlock();
-
-            throw e;
-        }
-    }
-
-    /**
-     * Leaves a call.
-     */
-    private void leave() {
-        try {
-            CU.unwindEvicts(cctx);
-        }
-        finally {
-            cctx.kernalContext().gateway().readUnlock();
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public IgniteUuid xid() {
-        return tx.xid();
-    }
-
-    /** {@inheritDoc} */
-    @Override public UUID nodeId() {
-        return tx.nodeId();
-    }
-
-    /** {@inheritDoc} */
-    @Override public long threadId() {
-        return tx.threadId();
-    }
-
-    /** {@inheritDoc} */
-    @Override public long startTime() {
-        return tx.startTime();
-    }
-
-    /** {@inheritDoc} */
-    @Override public IgniteTxIsolation isolation() {
-        return tx.isolation();
-    }
-
-    /** {@inheritDoc} */
-    @Override public IgniteTxConcurrency concurrency() {
-        return tx.concurrency();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean isInvalidate() {
-        return tx.isInvalidate();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean implicit() {
-        return tx.implicit();
-    }
-
-    /** {@inheritDoc} */
-    @Override public long timeout() {
-        return tx.timeout();
-    }
-
-    /** {@inheritDoc} */
-    @Override public IgniteTxState state() {
-        return tx.state();
-    }
-
-    /** {@inheritDoc} */
-    @Override public long timeout(long timeout) {
-        return tx.timeout(timeout);
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean setRollbackOnly() {
-        enter();
-
-        try {
-            return tx.setRollbackOnly();
-        }
-        finally {
-            leave();
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean isRollbackOnly() {
-        enter();
-
-        try {
-            return tx.isRollbackOnly();
-        }
-        finally {
-            leave();
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public void commit() throws IgniteCheckedException {
-        enter();
-
-        try {
-            cctx.commitTxAsync(tx).get();
-        }
-        finally {
-            leave();
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public void close() throws IgniteCheckedException {
-        enter();
-
-        try {
-            cctx.endTx(tx);
-        }
-        finally {
-            leave();
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public IgniteFuture<IgniteTx> commitAsync() {
-        enter();
-
-        try {
-
-            return cctx.commitTxAsync(tx);
-        }
-        finally {
-            leave();
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public void rollback() throws IgniteCheckedException {
-        enter();
-
-        try {
-            cctx.rollbackTx(tx);
-        }
-        finally {
-            leave();
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public void copyMeta(GridMetadataAware from) {
-        tx.copyMeta(from);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void copyMeta(Map<String, ?> data) {
-        tx.copyMeta(data);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V1> V1 addMeta(String name, V1 val) {
-        return tx.addMeta(name, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V1> V1 putMetaIfAbsent(String name, V1 val) {
-        return tx.putMetaIfAbsent(name, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V1> V1 putMetaIfAbsent(String name, Callable<V1> c) {
-        return tx.putMetaIfAbsent(name, c);
-    }
-
-    /** {@inheritDoc} */
-    @Nullable @Override public <V1> V1 addMetaIfAbsent(String name, V1 val) {
-        return tx.addMeta(name, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V1> V1 addMetaIfAbsent(String name, @Nullable Callable<V1>
c) {
-        return tx.addMetaIfAbsent(name, c);
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings({"RedundantTypeArguments"})
-    @Override public <V1> V1 meta(String name) {
-        return tx.<V1>meta(name);
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings({"RedundantTypeArguments"})
-    @Override public <V1> V1 removeMeta(String name) {
-        return tx.<V1>removeMeta(name);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V1> boolean removeMeta(String name, V1 val) {
-        return tx.removeMeta(name, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V1> Map<String, V1> allMeta() {
-        return tx.allMeta();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean hasMeta(String name) {
-        return tx.hasMeta(name);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V1> boolean hasMeta(String name, V1 val) {
-        return tx.hasMeta(name, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <V1> boolean replaceMeta(String name, V1 curVal, V1 newVal) {
-        return tx.replaceMeta(name, curVal, newVal);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeExternal(ObjectOutput out) throws IOException {
-        out.writeObject(tx);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
-        tx = (GridCacheTxAdapter<K, V>)in.readObject();
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(IgniteTxProxyImpl.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8365bb3d/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxMetricsAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxMetricsAdapter.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxMetricsAdapter.java
new file mode 100644
index 0000000..ff0ffab
--- /dev/null
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxMetricsAdapter.java
@@ -0,0 +1,108 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.gridgain.grid.kernal.processors.cache.transactions;
+
+import org.apache.ignite.transactions.*;
+import org.gridgain.grid.util.typedef.internal.*;
+
+import java.io.*;
+
+/**
+ * Tx metrics adapter.
+ */
+public class IgniteTxMetricsAdapter implements IgniteTxMetrics, Externalizable {
+    /** Number of transaction commits. */
+    private volatile int txCommits;
+
+    /** Number of transaction rollbacks. */
+    private volatile int txRollbacks;
+
+    /** Last commit time. */
+    private volatile long commitTime;
+
+    /** Last rollback time. */
+    private volatile long rollbackTime;
+
+    /**
+     *
+     */
+    public IgniteTxMetricsAdapter() {
+
+    }
+
+    /**
+     * @param m Transaction metrics to copy.
+     */
+    public IgniteTxMetricsAdapter(IgniteTxMetrics m) {
+        commitTime = m.commitTime();
+        rollbackTime = m.rollbackTime();
+        txCommits = m.txCommits();
+        txRollbacks = m.txRollbacks();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long commitTime() {
+        return commitTime;
+    }
+
+    /** {@inheritDoc} */
+    @Override public long rollbackTime() {
+        return rollbackTime;
+    }
+
+    /** {@inheritDoc} */
+    @Override public int txCommits() {
+        return txCommits;
+    }
+
+    /** {@inheritDoc} */
+    @Override public int txRollbacks() {
+        return txRollbacks;
+    }
+
+    /**
+     * Transaction commit callback.
+     */
+    public void onTxCommit() {
+        commitTime = U.currentTimeMillis();
+
+        txCommits++;
+    }
+
+    /**
+     * Transaction rollback callback.
+     */
+    public void onTxRollback() {
+        rollbackTime = U.currentTimeMillis();
+
+        txRollbacks++;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void writeExternal(ObjectOutput out) throws IOException {
+        out.writeLong(commitTime);
+        out.writeLong(rollbackTime);
+        out.writeInt(txCommits);
+        out.writeInt(txRollbacks);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
+        commitTime = in.readLong();
+        rollbackTime = in.readLong();
+        txCommits = in.readInt();
+        txRollbacks = in.readInt();
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(IgniteTxMetricsAdapter.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8365bb3d/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxProxy.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxProxy.java
new file mode 100644
index 0000000..d281765
--- /dev/null
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxProxy.java
@@ -0,0 +1,19 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.gridgain.grid.kernal.processors.cache.transactions;
+
+import org.apache.ignite.transactions.*;
+
+/**
+ * Marker interface for transaction proxy.
+ */
+public interface IgniteTxProxy extends IgniteTx {
+    // No-op.
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8365bb3d/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
new file mode 100644
index 0000000..e41a5ad
--- /dev/null
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxProxyImpl.java
@@ -0,0 +1,304 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.gridgain.grid.kernal.processors.cache.transactions;
+
+import org.apache.ignite.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.transactions.*;
+import org.gridgain.grid.*;
+import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.util.tostring.*;
+import org.gridgain.grid.util.typedef.internal.*;
+import org.jetbrains.annotations.*;
+
+import java.io.*;
+import java.util.*;
+import java.util.concurrent.*;
+
+/**
+ * Cache transaction proxy.
+ */
+public class IgniteTxProxyImpl<K, V> implements IgniteTxProxy, Externalizable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Wrapped transaction. */
+    @GridToStringInclude
+    private GridCacheTxEx<K, V> tx;
+
+    /** Gateway. */
+    @GridToStringExclude
+    private GridCacheSharedContext<K, V> cctx;
+
+    /**
+     * Empty constructor required for {@link Externalizable}.
+     */
+    public IgniteTxProxyImpl() {
+        // No-op.
+    }
+
+    /**
+     * @param tx Transaction.
+     */
+    public IgniteTxProxyImpl(GridCacheTxEx<K, V> tx, GridCacheSharedContext<K, V>
cctx) {
+        assert tx != null;
+        assert cctx != null;
+
+        this.tx = tx;
+        this.cctx = cctx;
+    }
+
+    /**
+     * Enters a call.
+     */
+    private void enter() {
+        if (cctx.deploymentEnabled())
+            cctx.deploy().onEnter();
+
+        try {
+            cctx.kernalContext().gateway().readLock();
+        }
+        catch (IllegalStateException e) {
+            throw e;
+        }
+        catch (RuntimeException | Error e) {
+            cctx.kernalContext().gateway().readUnlock();
+
+            throw e;
+        }
+    }
+
+    /**
+     * Leaves a call.
+     */
+    private void leave() {
+        try {
+            CU.unwindEvicts(cctx);
+        }
+        finally {
+            cctx.kernalContext().gateway().readUnlock();
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteUuid xid() {
+        return tx.xid();
+    }
+
+    /** {@inheritDoc} */
+    @Override public UUID nodeId() {
+        return tx.nodeId();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long threadId() {
+        return tx.threadId();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long startTime() {
+        return tx.startTime();
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteTxIsolation isolation() {
+        return tx.isolation();
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteTxConcurrency concurrency() {
+        return tx.concurrency();
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean isInvalidate() {
+        return tx.isInvalidate();
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean implicit() {
+        return tx.implicit();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long timeout() {
+        return tx.timeout();
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteTxState state() {
+        return tx.state();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long timeout(long timeout) {
+        return tx.timeout(timeout);
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean setRollbackOnly() {
+        enter();
+
+        try {
+            return tx.setRollbackOnly();
+        }
+        finally {
+            leave();
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean isRollbackOnly() {
+        enter();
+
+        try {
+            return tx.isRollbackOnly();
+        }
+        finally {
+            leave();
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override public void commit() throws IgniteCheckedException {
+        enter();
+
+        try {
+            cctx.commitTxAsync(tx).get();
+        }
+        finally {
+            leave();
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override public void close() throws IgniteCheckedException {
+        enter();
+
+        try {
+            cctx.endTx(tx);
+        }
+        finally {
+            leave();
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteFuture<IgniteTx> commitAsync() {
+        enter();
+
+        try {
+
+            return cctx.commitTxAsync(tx);
+        }
+        finally {
+            leave();
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override public void rollback() throws IgniteCheckedException {
+        enter();
+
+        try {
+            cctx.rollbackTx(tx);
+        }
+        finally {
+            leave();
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override public void copyMeta(GridMetadataAware from) {
+        tx.copyMeta(from);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void copyMeta(Map<String, ?> data) {
+        tx.copyMeta(data);
+    }
+
+    /** {@inheritDoc} */
+    @Override public <V1> V1 addMeta(String name, V1 val) {
+        return tx.addMeta(name, val);
+    }
+
+    /** {@inheritDoc} */
+    @Override public <V1> V1 putMetaIfAbsent(String name, V1 val) {
+        return tx.putMetaIfAbsent(name, val);
+    }
+
+    /** {@inheritDoc} */
+    @Override public <V1> V1 putMetaIfAbsent(String name, Callable<V1> c) {
+        return tx.putMetaIfAbsent(name, c);
+    }
+
+    /** {@inheritDoc} */
+    @Nullable @Override public <V1> V1 addMetaIfAbsent(String name, V1 val) {
+        return tx.addMeta(name, val);
+    }
+
+    /** {@inheritDoc} */
+    @Override public <V1> V1 addMetaIfAbsent(String name, @Nullable Callable<V1>
c) {
+        return tx.addMetaIfAbsent(name, c);
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings({"RedundantTypeArguments"})
+    @Override public <V1> V1 meta(String name) {
+        return tx.<V1>meta(name);
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings({"RedundantTypeArguments"})
+    @Override public <V1> V1 removeMeta(String name) {
+        return tx.<V1>removeMeta(name);
+    }
+
+    /** {@inheritDoc} */
+    @Override public <V1> boolean removeMeta(String name, V1 val) {
+        return tx.removeMeta(name, val);
+    }
+
+    /** {@inheritDoc} */
+    @Override public <V1> Map<String, V1> allMeta() {
+        return tx.allMeta();
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean hasMeta(String name) {
+        return tx.hasMeta(name);
+    }
+
+    /** {@inheritDoc} */
+    @Override public <V1> boolean hasMeta(String name, V1 val) {
+        return tx.hasMeta(name, val);
+    }
+
+    /** {@inheritDoc} */
+    @Override public <V1> boolean replaceMeta(String name, V1 curVal, V1 newVal) {
+        return tx.replaceMeta(name, curVal, newVal);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void writeExternal(ObjectOutput out) throws IOException {
+        out.writeObject(tx);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
+        tx = (GridCacheTxAdapter<K, V>)in.readObject();
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(IgniteTxProxyImpl.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8365bb3d/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 d7da1ab..5e0560e 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
@@ -20,6 +20,7 @@ import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.managers.communication.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 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.*;


Mime
View raw message