public final class IsolationLevel extends Object implements TransactionDefinition
Modifier and Type | Field and Description |
---|---|
static IsolationLevel |
READ_COMMITTED
The read committed isolation level.
|
static IsolationLevel |
READ_UNCOMMITTED
The read uncommitted isolation level.
|
static IsolationLevel |
REPEATABLE_READ
The repeatable read isolation level.
|
static IsolationLevel |
SERIALIZABLE
The serializable isolation level.
|
ISOLATION_LEVEL, LOCK_WAIT_TIMEOUT, NAME, READ_ONLY
Modifier and Type | Method and Description |
---|---|
String |
asSql()
Returns the SQL string represented by each value.
|
<T> T |
getAttribute(Option<T> option)
Retrieve a transaction attribute by its
Option identifier. |
String |
toString() |
static IsolationLevel |
valueOf(String sql)
Returns a constant single of an isolation level.
|
public static final IsolationLevel READ_COMMITTED
public static final IsolationLevel READ_UNCOMMITTED
public static final IsolationLevel REPEATABLE_READ
public static final IsolationLevel SERIALIZABLE
public static IsolationLevel valueOf(String sql)
sql
- the SQL statement representing the isolation levelIllegalArgumentException
- if name
is null
or emptypublic <T> T getAttribute(Option<T> option)
TransactionDefinition
Option
identifier. This low-level interface allows querying transaction attributes supported by the Connection
that should be applied
when starting a new transaction.getAttribute
in interface TransactionDefinition
T
- requested value typeoption
- the option to retrieve the value fornull
to indicate absence of the attribute.public String asSql()
Copyright © 2022. All rights reserved.