Package org.h2.engine
Enum Class IsolationLevel
- All Implemented Interfaces:
Serializable
,Comparable<IsolationLevel>
,Constable
Level of isolation.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionDirty reads aren't allowed; non-repeatable reads and phantom reads are allowed.Dirty reads, non-repeatable reads and phantom reads are allowed.Dirty reads and non-repeatable reads aren't allowed; phantom reads are allowed.Dirty reads, non-repeatable reads and phantom reads are'n allowed.Dirty reads, non-repeatable reads and phantom reads are'n allowed. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether a non-repeatable read phenomena is allowed.static IsolationLevel
fromJdbc
(int level) Returns the isolation level from LOCK_MODE equivalent for PageStore and old versions of H2.static IsolationLevel
fromLockMode
(int lockMode) Returns the isolation level from LOCK_MODE equivalent for PageStore and old versions of H2.static IsolationLevel
Returns the isolation level from its SQL name.int
getJdbc()
Returns the JDBC constant for this isolation level.int
Returns the LOCK_MODE equivalent for PageStore and old versions of H2.getSQL()
Returns the SQL representation of this isolation level.static IsolationLevel
Returns the enum constant of this class with the specified name.static IsolationLevel[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
READ_UNCOMMITTED
Dirty reads, non-repeatable reads and phantom reads are allowed. -
READ_COMMITTED
Dirty reads aren't allowed; non-repeatable reads and phantom reads are allowed. -
REPEATABLE_READ
Dirty reads and non-repeatable reads aren't allowed; phantom reads are allowed. -
SNAPSHOT
Dirty reads, non-repeatable reads and phantom reads are'n allowed. -
SERIALIZABLE
Dirty reads, non-repeatable reads and phantom reads are'n allowed. Concurrent and serial execution of transactions with this isolation level should have the same effect.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
fromJdbc
Returns the isolation level from LOCK_MODE equivalent for PageStore and old versions of H2.- Parameters:
level
- the LOCK_MODE value- Returns:
- the isolation level
-
fromLockMode
Returns the isolation level from LOCK_MODE equivalent for PageStore and old versions of H2.- Parameters:
lockMode
- the LOCK_MODE value- Returns:
- the isolation level
-
fromSql
Returns the isolation level from its SQL name.- Parameters:
sql
- the SQL name- Returns:
- the isolation level from its SQL name
-
getSQL
Returns the SQL representation of this isolation level.- Returns:
- SQL representation of this isolation level
-
getJdbc
public int getJdbc()Returns the JDBC constant for this isolation level.- Returns:
- the JDBC constant for this isolation level
-
getLockMode
public int getLockMode()Returns the LOCK_MODE equivalent for PageStore and old versions of H2.- Returns:
- the LOCK_MODE equivalent
-
allowNonRepeatableRead
public boolean allowNonRepeatableRead()Returns whether a non-repeatable read phenomena is allowed.- Returns:
- whether a non-repeatable read phenomena is allowed
-