Enum Class IsolationLevel

java.lang.Object
java.lang.Enum<IsolationLevel>
org.apache.iceberg.IsolationLevel
All Implemented Interfaces:
Serializable, Comparable<IsolationLevel>, Constable

public enum IsolationLevel extends Enum<IsolationLevel>
An isolation level in a table.

Two isolation levels are supported: serializable and snapshot isolation. Both of them provide a read consistent view of the table to all operations and allow readers to see only already committed data. While serializable is the strongest isolation level in databases, snapshot isolation is beneficial for environments with many concurrent writers.

The serializable isolation level guarantees that an ongoing UPDATE/DELETE/MERGE operation fails if a concurrent transaction commits a new file that might contain rows matching the condition used in UPDATE/DELETE/MERGE. For example, if there is an ongoing update on a subset of rows and a concurrent transaction adds a new file with records that potentially match the update condition, the update operation must fail under the serializable isolation but can still commit under the snapshot isolation.

  • Enum Constant Details

  • Method Details

    • values

      public static IsolationLevel[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static IsolationLevel valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromName

      public static IsolationLevel fromName(String levelName)