public enum TranIsolation extends Enum<TranIsolation>
| Enum Constant and Description |
|---|
read_committed
只读取提交数据:其它事务,只能读取已提交数据
|
read_uncommitted
脏读:其它事务,可读取未提交数据
|
repeatable_read
可重复读:保证在同一个事务中多次读取同样数据的结果是一样的。
|
serializable
可串行化读:要求事务串行化执行,事务只能一个接着一个地执行,不能并发执行
|
unspecified
未申明(默认)
|
| Modifier and Type | Field and Description |
|---|---|
int |
level |
| Modifier and Type | Method and Description |
|---|---|
static TranIsolation |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TranIsolation[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TranIsolation unspecified
public static final TranIsolation read_uncommitted
public static final TranIsolation read_committed
public static final TranIsolation repeatable_read
public static final TranIsolation serializable
public static TranIsolation[] values()
for (TranIsolation c : TranIsolation.values()) System.out.println(c);
public static TranIsolation valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2025. All rights reserved.