Loading sharding-core/src/main/java/io/shardingsphere/core/constant/ShardingPropertiesConstant.java +1 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package io.shardingsphere.core.constant; import io.shardingsphere.core.constant.transaction.TransactionType; import lombok.Getter; import lombok.RequiredArgsConstructor; Loading sharding-core/src/main/java/io/shardingsphere/core/constant/TCLType.java→sharding-core/src/main/java/io/shardingsphere/core/constant/transaction/TransactionOperationType.java +4 −4 Original line number Diff line number Diff line Loading @@ -15,14 +15,14 @@ * </p> */ package io.shardingsphere.core.constant; package io.shardingsphere.core.constant.transaction; /** * TCL Type. * Transaction operation type. * * @author zhaojun */ public enum TCLType { public enum TransactionOperationType { SET, BEGIN, COMMIT, ROLLBACK, SAVEPOINT BEGIN, COMMIT, ROLLBACK } sharding-core/src/main/java/io/shardingsphere/core/constant/TransactionType.java→sharding-core/src/main/java/io/shardingsphere/core/constant/transaction/TransactionType.java +1 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ * </p> */ package io.shardingsphere.core.constant; package io.shardingsphere.core.constant.transaction; /** * Transaction type. Loading sharding-jdbc/src/main/java/io/shardingsphere/core/jdbc/adapter/AbstractConnectionAdapter.java +8 −8 Original line number Diff line number Diff line Loading @@ -18,8 +18,8 @@ package io.shardingsphere.core.jdbc.adapter; import com.google.common.base.Preconditions; import io.shardingsphere.core.constant.TCLType; import io.shardingsphere.core.constant.TransactionType; import io.shardingsphere.core.constant.transaction.TransactionOperationType; import io.shardingsphere.core.constant.transaction.TransactionType; import io.shardingsphere.core.hint.HintManagerHolder; import io.shardingsphere.core.jdbc.unsupported.AbstractUnsupportedOperationConnection; import io.shardingsphere.core.routing.router.masterslave.MasterVisitedManager; Loading Loading @@ -91,25 +91,25 @@ public abstract class AbstractConnectionAdapter extends AbstractUnsupportedOpera this.autoCommit = autoCommit; TransactionTypeHolder.set(TransactionType.LOCAL); recordMethodInvocation(Connection.class, "setAutoCommit", new Class[] {boolean.class}, new Object[] {autoCommit}); EventBusInstance.getInstance().post(createTransactionEvent(TCLType.BEGIN)); EventBusInstance.getInstance().post(createTransactionEvent(TransactionOperationType.BEGIN)); } @Override public final void commit() { EventBusInstance.getInstance().post(createTransactionEvent(TCLType.COMMIT)); EventBusInstance.getInstance().post(createTransactionEvent(TransactionOperationType.COMMIT)); } @Override public final void rollback() { EventBusInstance.getInstance().post(createTransactionEvent(TCLType.ROLLBACK)); EventBusInstance.getInstance().post(createTransactionEvent(TransactionOperationType.ROLLBACK)); } private ShardingTransactionEvent createTransactionEvent(final TCLType tclType) { private ShardingTransactionEvent createTransactionEvent(final TransactionOperationType operationType) { switch (TransactionTypeHolder.get()) { case LOCAL: return new LocalTransactionEvent(tclType, cachedConnections.values(), autoCommit); return new LocalTransactionEvent(operationType, cachedConnections.values(), autoCommit); case XA: return new XATransactionEvent(tclType, ""); return new XATransactionEvent(operationType, ""); case BASE: default: throw new UnsupportedOperationException(TransactionTypeHolder.get().name()); Loading sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/jdbc/JDBCBackendHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ package io.shardingsphere.proxy.backend.jdbc; import io.shardingsphere.core.constant.DatabaseType; import io.shardingsphere.core.constant.SQLType; import io.shardingsphere.core.constant.TransactionType; import io.shardingsphere.core.constant.transaction.TransactionType; import io.shardingsphere.core.merger.MergeEngineFactory; import io.shardingsphere.core.merger.MergedResult; import io.shardingsphere.core.metadata.table.executor.TableMetaDataLoader; Loading Loading
sharding-core/src/main/java/io/shardingsphere/core/constant/ShardingPropertiesConstant.java +1 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package io.shardingsphere.core.constant; import io.shardingsphere.core.constant.transaction.TransactionType; import lombok.Getter; import lombok.RequiredArgsConstructor; Loading
sharding-core/src/main/java/io/shardingsphere/core/constant/TCLType.java→sharding-core/src/main/java/io/shardingsphere/core/constant/transaction/TransactionOperationType.java +4 −4 Original line number Diff line number Diff line Loading @@ -15,14 +15,14 @@ * </p> */ package io.shardingsphere.core.constant; package io.shardingsphere.core.constant.transaction; /** * TCL Type. * Transaction operation type. * * @author zhaojun */ public enum TCLType { public enum TransactionOperationType { SET, BEGIN, COMMIT, ROLLBACK, SAVEPOINT BEGIN, COMMIT, ROLLBACK }
sharding-core/src/main/java/io/shardingsphere/core/constant/TransactionType.java→sharding-core/src/main/java/io/shardingsphere/core/constant/transaction/TransactionType.java +1 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ * </p> */ package io.shardingsphere.core.constant; package io.shardingsphere.core.constant.transaction; /** * Transaction type. Loading
sharding-jdbc/src/main/java/io/shardingsphere/core/jdbc/adapter/AbstractConnectionAdapter.java +8 −8 Original line number Diff line number Diff line Loading @@ -18,8 +18,8 @@ package io.shardingsphere.core.jdbc.adapter; import com.google.common.base.Preconditions; import io.shardingsphere.core.constant.TCLType; import io.shardingsphere.core.constant.TransactionType; import io.shardingsphere.core.constant.transaction.TransactionOperationType; import io.shardingsphere.core.constant.transaction.TransactionType; import io.shardingsphere.core.hint.HintManagerHolder; import io.shardingsphere.core.jdbc.unsupported.AbstractUnsupportedOperationConnection; import io.shardingsphere.core.routing.router.masterslave.MasterVisitedManager; Loading Loading @@ -91,25 +91,25 @@ public abstract class AbstractConnectionAdapter extends AbstractUnsupportedOpera this.autoCommit = autoCommit; TransactionTypeHolder.set(TransactionType.LOCAL); recordMethodInvocation(Connection.class, "setAutoCommit", new Class[] {boolean.class}, new Object[] {autoCommit}); EventBusInstance.getInstance().post(createTransactionEvent(TCLType.BEGIN)); EventBusInstance.getInstance().post(createTransactionEvent(TransactionOperationType.BEGIN)); } @Override public final void commit() { EventBusInstance.getInstance().post(createTransactionEvent(TCLType.COMMIT)); EventBusInstance.getInstance().post(createTransactionEvent(TransactionOperationType.COMMIT)); } @Override public final void rollback() { EventBusInstance.getInstance().post(createTransactionEvent(TCLType.ROLLBACK)); EventBusInstance.getInstance().post(createTransactionEvent(TransactionOperationType.ROLLBACK)); } private ShardingTransactionEvent createTransactionEvent(final TCLType tclType) { private ShardingTransactionEvent createTransactionEvent(final TransactionOperationType operationType) { switch (TransactionTypeHolder.get()) { case LOCAL: return new LocalTransactionEvent(tclType, cachedConnections.values(), autoCommit); return new LocalTransactionEvent(operationType, cachedConnections.values(), autoCommit); case XA: return new XATransactionEvent(tclType, ""); return new XATransactionEvent(operationType, ""); case BASE: default: throw new UnsupportedOperationException(TransactionTypeHolder.get().name()); Loading
sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/jdbc/JDBCBackendHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ package io.shardingsphere.proxy.backend.jdbc; import io.shardingsphere.core.constant.DatabaseType; import io.shardingsphere.core.constant.SQLType; import io.shardingsphere.core.constant.TransactionType; import io.shardingsphere.core.constant.transaction.TransactionType; import io.shardingsphere.core.merger.MergeEngineFactory; import io.shardingsphere.core.merger.MergedResult; import io.shardingsphere.core.metadata.table.executor.TableMetaDataLoader; Loading