public enum IsolationLevel extends java.lang.Enum<IsolationLevel>
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.
|Modifier and Type||Method and Description|
Returns the enum constant of this type with the specified name.
Returns an array containing the constants of this enum type, in the order they are declared.
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
public static final IsolationLevel SERIALIZABLE
public static final IsolationLevel SNAPSHOT
public static IsolationLevel values()
for (IsolationLevel c : IsolationLevel.values()) System.out.println(c);
public static IsolationLevel valueOf(java.lang.String name)
name- the name of the enum constant to be returned.
java.lang.IllegalArgumentException- if this enum type has no constant with the specified name
java.lang.NullPointerException- if the argument is null