Package org.apache.arrow.adbc.core
Enum IsolationLevel
- All Implemented Interfaces:
Serializable
,Comparable<IsolationLevel>
The isolation level to use for transactions when autocommit is disabled.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe database or driver default isolation level.The central distinction between serializability and linearizability is that serializability is a global property; a property of an entire history of operations and transactions.Lock-based concurrency control keeps write locks until the end of the transaction, but read locks are released as soon as a SELECT is performed.The lowest isolation level.Lock-based concurrency control keeps read AND write locks (acquired on selection data) until the end of the transaction.Serializability requires read and write locks to be released only at the end of the transaction.This isolation guarantees that all reads in the transaction will see a consistent snapshot of the database and the transaction should only successfully commit if no updates conflict with any concurrent updates made since that snapshot. -
Method Summary
Modifier and TypeMethodDescriptionstatic IsolationLevel
Returns the enum constant of this type with the specified name.static IsolationLevel[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
The database or driver default isolation level. -
READ_UNCOMMITTED
The lowest isolation level. Dirty reads are allowed, so one transaction may see not-yet-committed changes made by others. -
READ_COMMITTED
Lock-based concurrency control keeps write locks until the end of the transaction, but read locks are released as soon as a SELECT is performed. Non-repeatable reads can occur in this isolation level.More simply put, Read Committed is an isolation level that guarantees that any data read is committed at the moment it is read. It simply restricts the reader from seeing any intermediate, uncommitted, 'dirty' reads. It makes no promise whatsoever that if the transaction re-issues the read, it will find the same data; data is free to change after it is read.
-
REPEATABLE_READ
Lock-based concurrency control keeps read AND write locks (acquired on selection data) until the end of the transaction.However, range-locks are not managed, so phantom reads can occur. Write skew is possible at this isolation level in some systems.
-
SNAPSHOT
This isolation guarantees that all reads in the transaction will see a consistent snapshot of the database and the transaction should only successfully commit if no updates conflict with any concurrent updates made since that snapshot. -
SERIALIZABLE
Serializability requires read and write locks to be released only at the end of the transaction. This includes acquiring range- locks when a select query uses a ranged WHERE clause to avoid phantom reads. -
LINEARIZABLE
The central distinction between serializability and linearizability is that serializability is a global property; a property of an entire history of operations and transactions. Linearizability is a local property; a property of a single operation/transaction.Linearizability can be viewed as a special case of strict serializability where transactions are restricted to consist of a single operation applied to a single object.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-