Top Description Fields Constructors Methods
org.springframework.transaction.annotation

public final Enum Isolation

extends Enum<Isolation>
Class Inheritance
Imports
org.springframework.transaction.TransactionDefinition

Enumeration that represents transaction isolation levels for use with the @Transactional annotation, corresponding to the TransactionDefinition interface.
Authors
Colin Sampaleanu, Juergen Hoeller
Since
1.2

Field Summary

Modifier and TypeField and Description
public static final Isolation
DEFAULT

Use the default isolation level of the underlying data store.

public static final Isolation
READ_COMMITTED

A constant indicating that dirty reads are prevented; non-repeatable reads and phantom reads can occur.

public static final Isolation
READ_UNCOMMITTED

A constant indicating that dirty reads, non-repeatable reads, and phantom reads can occur.

public static final Isolation
REPEATABLE_READ

A constant indicating that dirty reads and non-repeatable reads are prevented; phantom reads can occur.

public static final Isolation
SERIALIZABLE

A constant indicating that dirty reads, non-repeatable reads, and phantom reads are prevented.

private final int

Constructor Summary

AccessConstructor and Description
private
Isolation(int value)

Method Summary

Modifier and TypeMethod and Description
public int
public static Isolation
public static Isolation[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DEFAULTback to summary
public static final Isolation DEFAULT

Use the default isolation level of the underlying data store.

All other levels correspond to the JDBC isolation levels.

See Also
java.sql.Connection
READ_COMMITTEDback to summary
public static final Isolation READ_COMMITTED

A constant indicating that dirty reads are prevented; non-repeatable reads and phantom reads can occur.

This level only prohibits a transaction from reading a row with uncommitted changes in it.

See Also
java.sql.Connection#TRANSACTION_READ_COMMITTED
READ_UNCOMMITTEDback to summary
public static final Isolation READ_UNCOMMITTED

A constant indicating that dirty reads, non-repeatable reads, and phantom reads can occur.

This level allows a row changed by one transaction to be read by another transaction before any changes in that row have been committed (a "dirty read"). If any of the changes are rolled back, the second transaction will have retrieved an invalid row.

See Also
java.sql.Connection#TRANSACTION_READ_UNCOMMITTED
REPEATABLE_READback to summary
public static final Isolation REPEATABLE_READ

A constant indicating that dirty reads and non-repeatable reads are prevented; phantom reads can occur.

This level prohibits a transaction from reading a row with uncommitted changes in it, and it also prohibits the situation where one transaction reads a row, a second transaction alters the row, and the first transaction re-reads the row, getting different values the second time (a "non-repeatable read").

See Also
java.sql.Connection#TRANSACTION_REPEATABLE_READ
SERIALIZABLEback to summary
public static final Isolation SERIALIZABLE

A constant indicating that dirty reads, non-repeatable reads, and phantom reads are prevented.

This level includes the prohibitions in REPEATABLE_READ and further prohibits the situation where one transaction reads all rows that satisfy a WHERE condition, a second transaction inserts a row that satisfies that WHERE condition, and the first transaction re-reads for the same condition, retrieving the additional "phantom" row in the second read.

See Also
java.sql.Connection#TRANSACTION_SERIALIZABLE
valueback to summary
private final int value

Constructor Detail

Isolationback to summary
private Isolation(int value)

Method Detail

valueback to summary
public int value()
valueOfback to summary
public static Isolation valueOf(String name)
valuesback to summary
public static Isolation[] values()