Package org.datanucleus.transaction
Interface TransactionIsolation
public interface TransactionIsolation
Definition of the transaction isolation levels considered by DataNucleus.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
A constant indicating that transactions are not supported.static final int
A constant indicating that dirty reads are prevented; non-repeatable reads and phantom reads can occur.static final int
A constant indicating that dirty reads, non-repeatable reads and phantom reads can occur.static final int
A constant indicating that dirty reads and non-repeatable reads are prevented; phantom reads can occur.static final int
A constant indicating that dirty reads, non-repeatable reads and phantom reads are prevented.
-
Field Details
-
NONE
static final int NONEA constant indicating that transactions are not supported.- See Also:
-
READ_UNCOMMITTED
static final int READ_UNCOMMITTEDA 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:
-
READ_COMMITTED
static final int READ_COMMITTEDA 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:
-
REPEATABLE_READ
static final int REPEATABLE_READA 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 rereads the row, getting different values the second time (a "non-repeatable read").- See Also:
-
SERIALIZABLE
static final int SERIALIZABLEA constant indicating that dirty reads, non-repeatable reads and phantom reads are prevented. This level includes the prohibitions inTRANSACTION_REPEATABLE_READ
and further prohibits the situation where one transaction reads all rows that satisfy aWHERE
condition, a second transaction inserts a row that satisfies thatWHERE
condition, and the first transaction rereads for the same condition, retrieving the additional "phantom" row in the second read.- See Also:
-