This is an automated email from the ASF dual-hosted git repository.

av pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 5aaa711b949 IGNITE-19847 IgniteTxAdapter.TxShadow removal WIP (#10807)
5aaa711b949 is described below

commit 5aaa711b949f28791951615fdb9631559bd68287
Author: Anton Vinogradov <[email protected]>
AuthorDate: Wed Jun 28 14:34:02 2023 +0300

    IGNITE-19847 IgniteTxAdapter.TxShadow removal WIP (#10807)
---
 .../cache/transactions/IgniteTxAdapter.java        | 585 ---------------------
 1 file changed, 585 deletions(-)

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 ec846abaf82..3a404b6859b 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
@@ -51,7 +51,6 @@ import 
org.apache.ignite.internal.processors.cache.CacheOperationContext;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheEntryEx;
 import 
org.apache.ignite.internal.processors.cache.GridCacheEntryRemovedException;
-import org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate;
 import org.apache.ignite.internal.processors.cache.GridCacheOperation;
 import org.apache.ignite.internal.processors.cache.GridCacheReturn;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
@@ -75,7 +74,6 @@ import 
org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException;
 import org.apache.ignite.internal.util.GridSetWrapper;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
 import org.apache.ignite.internal.util.lang.GridMetadataAwareAdapter;
-import org.apache.ignite.internal.util.lang.GridTuple;
 import org.apache.ignite.internal.util.tostring.GridToStringBuilder;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
@@ -2024,589 +2022,6 @@ public abstract class IgniteTxAdapter extends 
GridMetadataAwareAdapter implement
             "onePhaseCommit", onePhaseCommit);
     }
 
-    /**
-     * Transaction shadow class to be used for deserialization.
-     */
-    private static class TxShadow implements IgniteInternalTx {
-        /** Xid. */
-        private final IgniteUuid xid;
-
-        /** Node ID. */
-        private final UUID nodeId;
-
-        /** Thread ID. */
-        private final long threadId;
-
-        /** Start time. */
-        private final long startTime;
-
-        /** Start time in nanoseconds. */
-        private final long startTimeNanos;
-
-        /** Transaction isolation. */
-        private final TransactionIsolation isolation;
-
-        /** Concurrency. */
-        private final TransactionConcurrency concurrency;
-
-        /** Invalidate flag. */
-        private final boolean invalidate;
-
-        /** Timeout. */
-        private final long timeout;
-
-        /** State. */
-        private final TransactionState state;
-
-        /** Rollback only flag. */
-        private final boolean rollbackOnly;
-
-        /** Implicit flag. */
-        private final boolean implicit;
-
-        /**
-         * @param xid Xid.
-         * @param nodeId Node ID.
-         * @param threadId Thread ID.
-         * @param startTime Start time.
-         * @param isolation Isolation.
-         * @param concurrency Concurrency.
-         * @param invalidate Invalidate flag.
-         * @param implicit Implicit flag.
-         * @param timeout Transaction timeout.
-         * @param state Transaction state.
-         * @param rollbackOnly Rollback-only flag.
-         */
-        TxShadow(IgniteUuid xid, UUID nodeId, long threadId, long startTime, 
long startTimeNanos,
-            TransactionIsolation isolation, TransactionConcurrency 
concurrency, boolean invalidate, boolean implicit,
-            long timeout, TransactionState state, boolean rollbackOnly) {
-            this.xid = xid;
-            this.nodeId = nodeId;
-            this.threadId = threadId;
-            this.startTime = startTime;
-            this.startTimeNanos = startTimeNanos;
-            this.isolation = isolation;
-            this.concurrency = concurrency;
-            this.invalidate = invalidate;
-            this.implicit = implicit;
-            this.timeout = timeout;
-            this.state = state;
-            this.rollbackOnly = rollbackOnly;
-        }
-
-        /** {@inheritDoc} */
-        @Override public void mvccSnapshot(MvccSnapshot mvccSnapshot) {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public MvccSnapshot mvccSnapshot() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public UUID incrementalSnapshotId() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public void incrementalSnapshotId(UUID id) {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean localResult() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public IgniteUuid xid() {
-            return xid;
-        }
-
-        /** {@inheritDoc} */
-        @Override public UUID nodeId() {
-            return nodeId;
-        }
-
-        /** {@inheritDoc} */
-        @Override public long threadId() {
-            return threadId;
-        }
-
-        /** {@inheritDoc} */
-        @Override public long startTime() {
-            return startTime;
-        }
-
-        /** {@inheritDoc} */
-        @Override public long startTimeNanos() {
-            return startTimeNanos;
-        }
-
-        /** {@inheritDoc} */
-        @Override public TransactionIsolation isolation() {
-            return isolation;
-        }
-
-        /** {@inheritDoc} */
-        @Override public TransactionConcurrency concurrency() {
-            return concurrency;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean isInvalidate() {
-            return invalidate;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean implicit() {
-            return implicit;
-        }
-
-        /** {@inheritDoc} */
-        @Override public long timeout() {
-            return timeout;
-        }
-
-        /** {@inheritDoc} */
-        @Override public TransactionState state() {
-            return state;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean isRollbackOnly() {
-            return rollbackOnly;
-        }
-
-        /** {@inheritDoc} */
-        @Override public long timeout(long timeout) {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean setRollbackOnly() {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public void errorWhenCommitting() {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean activeCachesDeploymentEnabled() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public void activeCachesDeploymentEnabled(boolean 
depEnabled) {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Nullable @Override public Object addMeta(int key, Object val) {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Nullable @Override public Object removeMeta(int key) {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Nullable @Override public Object meta(int key) {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public int size() {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean storeEnabled() {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean storeWriteThrough() {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean system() {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public byte ioPolicy() {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public AffinityTopologyVersion topologyVersion() {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public AffinityTopologyVersion topologyVersionSnapshot() {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean implicitSingle() {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public AffinityTopologyVersion 
topologyVersion(AffinityTopologyVersion topVer) {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public void commitError(Throwable e) {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Nullable @Override public String label() {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean empty() {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean markFinalizing(FinalizationStatus status) {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Nullable @Override public FinalizationStatus finalizationStatus() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public void addInvalidPartition(int cacheId, int part) {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public Map<Integer, Set<Integer>> invalidPartitions() {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Nullable @Override public GridCacheVersion ownedVersion(IgniteTxKey 
key) {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Nullable @Override public UUID otherNodeId() {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public UUID eventNodeId() {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Override public UUID originatingNodeId() {
-            throw new IllegalStateException("Deserialized transaction can only 
be used as read-only.");
-        }
-
-        /** {@inheritDoc} */
-        @Nullable @Override public TxCounters txCounters(boolean 
createIfAbsent) {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public IgniteTxState txState() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public Collection<UUID> masterNodeIds() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Nullable @Override public GridCacheVersion nearXidVersion() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Nullable @Override public Map<UUID, Collection<UUID>> 
transactionNodes() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean ownsLock(GridCacheEntryEx entry) throws 
GridCacheEntryRemovedException {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean ownsLockUnsafe(GridCacheEntryEx entry) {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean near() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean dht() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean colocated() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean local() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public UUID subjectId() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public int taskNameHash() {
-            return 0;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean user() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean hasWriteKey(IgniteTxKey key) {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public Set<IgniteTxKey> readSet() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public Set<IgniteTxKey> writeSet() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public Collection<IgniteTxEntry> allEntries() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public Collection<IgniteTxEntry> writeEntries() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public Collection<IgniteTxEntry> readEntries() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public Map<IgniteTxKey, IgniteTxEntry> writeMap() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public Map<IgniteTxKey, IgniteTxEntry> readMap() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public Collection<IgniteTxEntry> optimisticLockEntries() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public void seal() {
-
-        }
-
-        /** {@inheritDoc} */
-        @Nullable @Override public IgniteTxEntry entry(IgniteTxKey key) {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Nullable @Override public GridTuple<CacheObject> 
peek(GridCacheContext ctx,
-            boolean failFast,
-            KeyCacheObject key) {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public GridCacheVersion xidVersion() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public GridCacheVersion commitVersion() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public void commitVersion(GridCacheVersion commitVer) {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public IgniteInternalFuture<?> salvageTx() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public GridCacheVersion writeVersion() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public void writeVersion(GridCacheVersion ver) {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public IgniteInternalFuture<IgniteInternalTx> finishFuture() 
{
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Nullable @Override public IgniteInternalFuture<IgniteInternalTx> 
currentPrepareFuture() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean state(TransactionState state) {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public void invalidate(boolean invalidate) {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public void systemInvalidate(boolean sysInvalidate) {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean isSystemInvalidate() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public IgniteInternalFuture<IgniteInternalTx> 
rollbackAsync() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public IgniteInternalFuture<IgniteInternalTx> commitAsync() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean onOwnerChanged(GridCacheEntryEx entry, 
GridCacheMvccCandidate owner) {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean timedOut() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean done() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean optimistic() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean pessimistic() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean readCommitted() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean repeatableRead() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean serializable() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public long remainingTime() throws 
IgniteTxTimeoutCheckedException {
-            return 0;
-        }
-
-        /** {@inheritDoc} */
-        @Override public Collection<GridCacheVersion> alternateVersions() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean needsCompletedVersions() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public void completedVersions(GridCacheVersion base, 
Collection committed, Collection rolledback) {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean internal() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean onePhaseCommit() {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean equals(Object o) {
-            return this == o || o instanceof IgniteInternalTx && 
xid.equals(((IgniteInternalTx)o).xid());
-        }
-
-        /** {@inheritDoc} */
-        @Override public int hashCode() {
-            return xid.hashCode();
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return S.toString(TxShadow.class, this);
-        }
-    }
-
     /**
      *
      */

Reply via email to