public enum IsolationLevel extends java.lang.Enum<IsolationLevel>
Enum Constant and Description |
---|
READ_COMMITTED
Dirty reads aren't allowed; non-repeatable reads and phantom reads are
allowed.
|
READ_UNCOMMITTED
Dirty reads, non-repeatable reads and phantom reads are allowed.
|
REPEATABLE_READ
Dirty reads and non-repeatable reads aren't allowed; phantom reads are
allowed.
|
SERIALIZABLE
Dirty reads, non-repeatable reads and phantom reads are'n allowed.
|
SNAPSHOT
Dirty reads, non-repeatable reads and phantom reads are'n allowed.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowNonRepeatableRead()
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 |
fromSql(java.lang.String sql)
Returns the isolation level from its SQL name.
|
int |
getJdbc()
Returns the JDBC constant for this isolation level.
|
int |
getLockMode()
Returns the LOCK_MODE equivalent for PageStore and old versions of H2.
|
java.lang.String |
getSQL()
Returns the SQL representation of this isolation level.
|
static IsolationLevel |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static IsolationLevel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final IsolationLevel READ_UNCOMMITTED
public static final IsolationLevel READ_COMMITTED
public static final IsolationLevel REPEATABLE_READ
public static final IsolationLevel SNAPSHOT
public static final IsolationLevel SERIALIZABLE
public static IsolationLevel[] values()
for (IsolationLevel c : IsolationLevel.values()) System.out.println(c);
public static IsolationLevel valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static IsolationLevel fromJdbc(int level)
level
- the LOCK_MODE valuepublic static IsolationLevel fromLockMode(int lockMode)
lockMode
- the LOCK_MODE valuepublic static IsolationLevel fromSql(java.lang.String sql)
sql
- the SQL namepublic java.lang.String getSQL()
public int getJdbc()
public int getLockMode()
public boolean allowNonRepeatableRead()