Top Description Fields Constructors Methods
org.h2.engine

public final Enum IsolationLevel

extends Enum<IsolationLevel>
Class Inheritance
Imports
java.sql.Connection, org.h2.message.DbException

Level of isolation.

Field Summary

Modifier and TypeField and Description
private final int
private final int
public static final IsolationLevel
READ_COMMITTED

Dirty reads aren't allowed; non-repeatable reads and phantom reads are allowed.

public static final IsolationLevel
READ_UNCOMMITTED

Dirty reads, non-repeatable reads and phantom reads are allowed.

public static final IsolationLevel
REPEATABLE_READ

Dirty reads and non-repeatable reads aren't allowed; phantom reads are allowed.

public static final IsolationLevel
SERIALIZABLE

Dirty reads, non-repeatable reads and phantom reads are'n allowed.

public static final IsolationLevel
SNAPSHOT

Dirty reads, non-repeatable reads and phantom reads are'n allowed.

private final String

Constructor Summary

AccessConstructor and Description
private
IsolationLevel(int jdbc, int lockMode)

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

whether a non-repeatable read phenomena is allowed
allowNonRepeatableRead
()

Returns whether a non-repeatable read phenomena is allowed.

public static IsolationLevel

Returns:

the isolation level
fromJdbc
(int
the LOCK_MODE value
level
)

Returns the isolation level from LOCK_MODE equivalent for PageStore and old versions of H2.

public static IsolationLevel

Returns:

the isolation level
fromLockMode
(int
the LOCK_MODE value
lockMode
)

Returns the isolation level from LOCK_MODE equivalent for PageStore and old versions of H2.

public static IsolationLevel

Returns:

the isolation level from its SQL name
fromSql
(String
the SQL name
sql
)

Returns the isolation level from its SQL name.

public int

Returns:

the JDBC constant for this isolation level
getJdbc
()

Returns the JDBC constant for this isolation level.

public int

Returns:

the LOCK_MODE equivalent
getLockMode
()

Returns the LOCK_MODE equivalent for PageStore and old versions of H2.

public String

Returns:

SQL representation of this isolation level
getSQL
()

Returns the SQL representation of this isolation level.

public static IsolationLevel
public static IsolationLevel[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

jdbcback to summary
private final int jdbc
lockModeback to summary
private final int lockMode
READ_COMMITTEDback to summary
public static final IsolationLevel READ_COMMITTED

Dirty reads aren't allowed; non-repeatable reads and phantom reads are allowed.

READ_UNCOMMITTEDback to summary
public static final IsolationLevel READ_UNCOMMITTED

Dirty reads, non-repeatable reads and phantom reads are allowed.

REPEATABLE_READback to summary
public static final IsolationLevel REPEATABLE_READ

Dirty reads and non-repeatable reads aren't allowed; phantom reads are allowed.

SERIALIZABLEback to summary
public static final IsolationLevel 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.

SNAPSHOTback to summary
public static final IsolationLevel SNAPSHOT

Dirty reads, non-repeatable reads and phantom reads are'n allowed.

sqlback to summary
private final String sql

Constructor Detail

IsolationLevelback to summary
private IsolationLevel(int jdbc, int lockMode)

Method Detail

allowNonRepeatableReadback to summary
public boolean allowNonRepeatableRead()

Returns whether a non-repeatable read phenomena is allowed.

Returns:boolean

whether a non-repeatable read phenomena is allowed

fromJdbcback to summary
public static IsolationLevel fromJdbc(int level)

Returns the isolation level from LOCK_MODE equivalent for PageStore and old versions of H2.

Parameters
level:int

the LOCK_MODE value

Returns:IsolationLevel

the isolation level

fromLockModeback to summary
public static IsolationLevel fromLockMode(int lockMode)

Returns the isolation level from LOCK_MODE equivalent for PageStore and old versions of H2.

Parameters
lockMode:int

the LOCK_MODE value

Returns:IsolationLevel

the isolation level

fromSqlback to summary
public static IsolationLevel fromSql(String sql)

Returns the isolation level from its SQL name.

Parameters
sql:String

the SQL name

Returns:IsolationLevel

the isolation level from its SQL name

getJdbcback to summary
public int getJdbc()

Returns the JDBC constant for this isolation level.

Returns:int

the JDBC constant for this isolation level

getLockModeback to summary
public int getLockMode()

Returns the LOCK_MODE equivalent for PageStore and old versions of H2.

Returns:int

the LOCK_MODE equivalent

getSQLback to summary
public String getSQL()

Returns the SQL representation of this isolation level.

Returns:String

SQL representation of this isolation level

valueOfback to summary
public static IsolationLevel valueOf(String name)
valuesback to summary
public static IsolationLevel[] values()