public enum TxIsolation extends Enum<TxIsolation>
These match those of java.sql.Connection with the addition of DEFAULT which implies the configured default of the DataSource.
This can be used with TxScope to define transactional scopes to execute method within.
TxScope| Enum Constant and Description |
|---|
DEFAULT
The default isolation level.
|
NONE
No Isolation level.
|
READ_COMMITED
Read Committed Isolation level.
|
READ_UNCOMMITTED
Read uncommitted Isolation level.
|
REPEATABLE_READ
Repeatable Read Isolation level.
|
SERIALIZABLE
Serializable Isolation level.
|
| Modifier and Type | Method and Description |
|---|---|
static TxIsolation |
fromLevel(int connectionIsolationLevel)
Return the TxIsolation given the java.sql.Connection isolation level.
|
int |
getLevel()
Return the level as per java.sql.Connection.
|
static TxIsolation |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TxIsolation[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TxIsolation READ_COMMITED
public static final TxIsolation READ_UNCOMMITTED
public static final TxIsolation REPEATABLE_READ
public static final TxIsolation SERIALIZABLE
public static final TxIsolation NONE
public static final TxIsolation DEFAULT
public static TxIsolation[] values()
for (TxIsolation c : TxIsolation.values()) System.out.println(c);
public static TxIsolation 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 nullpublic int getLevel()
Note that -1 denotes the default isolation level.
public static TxIsolation fromLevel(int connectionIsolationLevel)
Note that -1 denotes the default isolation level.
Copyright © 2016. All rights reserved.