Enum Isolation
- java.lang.Object
-
- java.lang.Enum<Isolation>
-
- net.sf.jkniv.sqlegance.transaction.Isolation
-
- All Implemented Interfaces:
Serializable,Comparable<Isolation>
public enum Isolation extends Enum<Isolation>
Enumeration that represents transaction isolation levels for use with the connection data source.- NONE
- READ_UNCOMMITTED
- READ_COMMITTED
- REPEATABLE_READ
- SERIALIZABLE
- Author:
- Alisson Gomes
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFAULTUse the default isolation level of the underlying connection data source.NONETransactions are not supportedREAD_COMMITTEDDirty reads are prevented; non-repeatable reads and phantom reads can occur.READ_UNCOMMITTEDDirty reads, non-repeatable reads and phantom reads can occur.REPEATABLE_READDirty reads and non-repeatable reads are prevented; phantom reads can occur.SERIALIZABLEDirty reads, non-repeatable reads and phantom reads are prevented.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static Isolationget(int level)static Isolationget(String type)abstract intlevel()static IsolationvalueOf(String name)Returns the enum constant of this type with the specified name.static Isolation[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT
public static final Isolation DEFAULT
Use the default isolation level of the underlying connection data source. This level cannot be set at connection isolation.
-
NONE
public static final Isolation NONE
Transactions are not supported
-
READ_UNCOMMITTED
public static final Isolation READ_UNCOMMITTED
Dirty reads, non-repeatable reads and phantom reads can occur.
-
READ_COMMITTED
public static final Isolation READ_COMMITTED
Dirty reads are prevented; non-repeatable reads and phantom reads can occur.
-
REPEATABLE_READ
public static final Isolation REPEATABLE_READ
Dirty reads and non-repeatable reads are prevented; phantom reads can occur.
-
SERIALIZABLE
public static final Isolation SERIALIZABLE
Dirty reads, non-repeatable reads and phantom reads are prevented.
-
-
Method Detail
-
values
public static Isolation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Isolation c : Isolation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Isolation valueOf(String name)
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
-
level
public abstract int level()
-
get
public static Isolation get(int level)
-
-