You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by av...@apache.org on 2018/07/27 09:05:37 UTC
ignite git commit: IGNITE-8446 (review fixes)
Repository: ignite
Updated Branches:
refs/heads/ignite-8446 f7a03679e -> c2426df39
IGNITE-8446 (review fixes)
Signed-off-by: Anton Vinogradov <av...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c2426df3
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c2426df3
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c2426df3
Branch: refs/heads/ignite-8446
Commit: c2426df39e1477c0c8dd254ea3d273ae10acdcc7
Parents: f7a0367
Author: Anton Vinogradov <av...@apache.org>
Authored: Fri Jul 27 12:05:28 2018 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Fri Jul 27 12:05:28 2018 +0300
----------------------------------------------------------------------
.../cache/transactions/IgniteTxAdapter.java | 2 +-
.../transactions/TransactionEventProxyImpl.java | 27 ++++++++++++--------
2 files changed, 17 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/c2426df3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
index 59bc349..785d667 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
@@ -1212,7 +1212,7 @@ public abstract class IgniteTxAdapter extends GridMetadataAwareAdapter implement
if (!system() /* ignoring system tx */ && evtMgr.isRecordable(type))
evtMgr.record(new TransactionStateChangedEvent(
cctx.discovery().localNode(),
- null,
+ "Transaction state changed.",
type,
new TransactionEventProxyImpl((GridNearTxLocal)this)));
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c2426df3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TransactionEventProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TransactionEventProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TransactionEventProxyImpl.java
index 7e6c0fe..f6bc668 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TransactionEventProxyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TransactionEventProxyImpl.java
@@ -42,6 +42,11 @@ public class TransactionEventProxyImpl implements TransactionProxy, Externalizab
/** */
private static final long serialVersionUID = 0L;
+ /** Unsupported operation message. */
+ private static final String UNSUPPORTED_OPERATION_MESSAGE = "All operations changing transaction's params or " +
+ "state are restricted inside event listener. " +
+ "The only exception is setRollbackOnly(), use it in case transaction should be rolled back.";
+
/** Xid. */
private IgniteUuid xid;
@@ -119,7 +124,7 @@ public class TransactionEventProxyImpl implements TransactionProxy, Externalizab
/** {@inheritDoc} */
@Override public long timeout(long timeout) {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException(UNSUPPORTED_OPERATION_MESSAGE);
}
/** {@inheritDoc} */
@@ -134,37 +139,37 @@ public class TransactionEventProxyImpl implements TransactionProxy, Externalizab
/** {@inheritDoc} */
@Override public void commit() throws IgniteException {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException(UNSUPPORTED_OPERATION_MESSAGE);
}
/** {@inheritDoc} */
@Override public IgniteFuture<Void> commitAsync() throws IgniteException {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException(UNSUPPORTED_OPERATION_MESSAGE);
}
/** {@inheritDoc} */
@Override public void close() throws IgniteException {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException(UNSUPPORTED_OPERATION_MESSAGE);
}
/** {@inheritDoc} */
@Override public void rollback() throws IgniteException {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException(UNSUPPORTED_OPERATION_MESSAGE);
}
/** {@inheritDoc} */
@Override public IgniteFuture<Void> rollbackAsync() throws IgniteException {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException(UNSUPPORTED_OPERATION_MESSAGE);
}
/** {@inheritDoc} */
@Override public void resume() throws IgniteException {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException(UNSUPPORTED_OPERATION_MESSAGE);
}
/** {@inheritDoc} */
@Override public void suspend() throws IgniteException {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException(UNSUPPORTED_OPERATION_MESSAGE);
}
/** {@inheritDoc} */
@@ -174,17 +179,17 @@ public class TransactionEventProxyImpl implements TransactionProxy, Externalizab
/** {@inheritDoc} */
@Override public IgniteAsyncSupport withAsync() {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("Operation deprecated.");
}
/** {@inheritDoc} */
@Override public boolean isAsync() {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("Operation deprecated.");
}
/** {@inheritDoc} */
@Override public <R> IgniteFuture<R> future() {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("Operation deprecated.");
}
/**