Loading sharding-core/src/main/java/io/shardingsphere/core/constant/ShardingPropertiesConstant.java +1 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ public enum ShardingPropertiesConstant { */ CONNECTION_MODE("connection.mode", ConnectionMode.MEMORY_STRICTLY.name(), String.class), PROXY_TRANSACTION_MODE("proxy.transaction.mode", TransactionType.NONE.name(), String.class), PROXY_TRANSACTION_MODE("proxy.transaction.mode", TransactionType.LOCAL.name(), String.class), PROXY_BACKEND_USE_NIO("proxy.backend.use.nio", Boolean.FALSE.toString(), boolean.class), Loading sharding-core/src/main/java/io/shardingsphere/core/constant/TransactionType.java +2 −42 Original line number Diff line number Diff line Loading @@ -17,52 +17,12 @@ package io.shardingsphere.core.constant; import lombok.Getter; import lombok.RequiredArgsConstructor; /** * TransactionType Enum. * Transaction type. * * @author zhaojun */ @RequiredArgsConstructor @Getter public enum TransactionType { /** * Default local transaction. */ NONE(""), /** * XA distribute transaction provided by RDBMS vendor. */ XA("XA"), /** * B.A.S.E distribute transaction. */ BASE("BASE"), /** * TCC (Try-Confirm-Cancel) distribute transaction mode. */ TCC("TCC"); private final String type; /** * Find enum by type value. * * @param type property type * @return value enum, return {@code NONE} if not found */ public static TransactionType findByValue(final String type) { for (TransactionType each : TransactionType.values()) { if (each.getType().equals(type)) { return each; } } return NONE; } LOCAL, XA, BASE } Loading
sharding-core/src/main/java/io/shardingsphere/core/constant/ShardingPropertiesConstant.java +1 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ public enum ShardingPropertiesConstant { */ CONNECTION_MODE("connection.mode", ConnectionMode.MEMORY_STRICTLY.name(), String.class), PROXY_TRANSACTION_MODE("proxy.transaction.mode", TransactionType.NONE.name(), String.class), PROXY_TRANSACTION_MODE("proxy.transaction.mode", TransactionType.LOCAL.name(), String.class), PROXY_BACKEND_USE_NIO("proxy.backend.use.nio", Boolean.FALSE.toString(), boolean.class), Loading
sharding-core/src/main/java/io/shardingsphere/core/constant/TransactionType.java +2 −42 Original line number Diff line number Diff line Loading @@ -17,52 +17,12 @@ package io.shardingsphere.core.constant; import lombok.Getter; import lombok.RequiredArgsConstructor; /** * TransactionType Enum. * Transaction type. * * @author zhaojun */ @RequiredArgsConstructor @Getter public enum TransactionType { /** * Default local transaction. */ NONE(""), /** * XA distribute transaction provided by RDBMS vendor. */ XA("XA"), /** * B.A.S.E distribute transaction. */ BASE("BASE"), /** * TCC (Try-Confirm-Cancel) distribute transaction mode. */ TCC("TCC"); private final String type; /** * Find enum by type value. * * @param type property type * @return value enum, return {@code NONE} if not found */ public static TransactionType findByValue(final String type) { for (TransactionType each : TransactionType.values()) { if (each.getType().equals(type)) { return each; } } return NONE; } LOCAL, XA, BASE }