Top Description Fields Constructors Methods
io.r2dbc.spi

public final Class IsolationLevel

extends Object
implements TransactionDefinition
Class Inheritance
All Implemented Interfaces
io.r2dbc.spi.TransactionDefinition

Represents a transaction isolation level constant.

Field Summary

Modifier and TypeField and Description
private static final ConstantPool<IsolationLevel>
public static final IsolationLevel
READ_COMMITTED

The read committed isolation level.

public static final IsolationLevel
READ_UNCOMMITTED

The read uncommitted isolation level.

public static final IsolationLevel
REPEATABLE_READ

The repeatable read isolation level.

public static final IsolationLevel
SERIALIZABLE

The serializable isolation level.

private final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the SQL string represented by each value
asSql
()

Returns the SQL string represented by each value.

public <T> T
getAttribute(Option<T>
the option to retrieve the value for
option
)

Implements io.r2dbc.spi.TransactionDefinition.getAttribute.

Retrieve a transaction attribute by its Option identifier.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public static IsolationLevel

Returns:

a constant singleton of the the isolation level
valueOf
(String
the SQL statement representing the isolation level
sql
)

Returns a constant single of an isolation level.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

CONSTANTSback to summary
private static final ConstantPool<IsolationLevel> CONSTANTS
READ_COMMITTEDback to summary
public static final IsolationLevel READ_COMMITTED

The read committed isolation level.

READ_UNCOMMITTEDback to summary
public static final IsolationLevel READ_UNCOMMITTED

The read uncommitted isolation level.

REPEATABLE_READback to summary
public static final IsolationLevel REPEATABLE_READ

The repeatable read isolation level.

SERIALIZABLEback to summary
public static final IsolationLevel SERIALIZABLE

The serializable isolation level.

sqlback to summary
private final String sql

Constructor Detail

IsolationLevelback to summary
private IsolationLevel(String sql)

Method Detail

asSqlback to summary
public String asSql()

Returns the SQL string represented by each value.

Returns:String

the SQL string represented by each value

getAttributeback to summary
public <T> T getAttribute(Option<T> option)

Implements io.r2dbc.spi.TransactionDefinition.getAttribute.

Doc from io.r2dbc.spi.TransactionDefinition.getAttribute.

Retrieve a transaction attribute by its Option identifier. This low-level interface allows querying transaction attributes supported by the Connection that should be applied when starting a new transaction.

Parameters
<T>
requested value type
option:Option<T>

the option to retrieve the value for

Returns:T

the value of the transaction attribute. Can be null to indicate absence of the attribute.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
valueOfback to summary
public static IsolationLevel valueOf(String sql)

Returns a constant single of an isolation level.

Parameters
sql:String

the SQL statement representing the isolation level

Returns:IsolationLevel

a constant singleton of the the isolation level

Exceptions
IllegalArgumentException:
if name is null or empty