public enum TransactionIsolationLevel extends Enum<TransactionIsolationLevel>
| 枚举常量和说明 |
|---|
TRANSACTION_NONE
指示事务不受支持的常量.A constant indicating that transactions are not supported.
|
TRANSACTION_READ_COMMITTED
指示不可以发生脏读的常量;不可重复读和虚读可以发生
A constant indicating that dirty reads are prevented; non-repeatable reads and phantom reads can occur. |
TRANSACTION_READ_UNCOMMITTED
指示可以发生:脏读 (dirty read)、不可重复读和虚读 (phantom read) 的常量
A constant indicating that dirty reads, non-repeatable reads and phantom reads can occur. |
TRANSACTION_REPEATABLE_READ
指示不可以发生脏读和不可重复读的常量;虚读可以发生
A constant indicating that dirty reads and non-repeatable reads are prevented; phantom reads can occur. |
TRANSACTION_SERIALIZABLE
指示不可以发生脏读、不可重复读和虚读的常量
A constant indicating that dirty reads, non-repeatable reads and phantom reads are prevented. |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getLevel()
获取隔离级别.get the value of TransactionIsolationLevel.
|
static TransactionIsolationLevel |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static TransactionIsolationLevel[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final TransactionIsolationLevel TRANSACTION_NONE
public static final TransactionIsolationLevel TRANSACTION_READ_UNCOMMITTED
public static final TransactionIsolationLevel TRANSACTION_READ_COMMITTED
public static final TransactionIsolationLevel TRANSACTION_REPEATABLE_READ
public static final TransactionIsolationLevel TRANSACTION_SERIALIZABLE
TRANSACTION_REPEATABLE_READ and further prohibits the
situation where one transaction reads all rows that satisfy
a WHERE condition, a second transaction inserts a row that
satisfies that WHERE condition, and the first transaction
rereads for the same condition, retrieving the additional
"phantom" row in the second read.public static TransactionIsolationLevel[] values()
for (TransactionIsolationLevel c : TransactionIsolationLevel.values()) System.out.println(c);
public static TransactionIsolationLevel valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public int getLevel()
Copyright © 2021. All rights reserved.