Package com.complexible.stardog.db
Enum DatabaseOptions.TransactionIsolation
- java.lang.Object
-
- java.lang.Enum<DatabaseOptions.TransactionIsolation>
-
- com.complexible.stardog.db.DatabaseOptions.TransactionIsolation
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<DatabaseOptions.TransactionIsolation>
- Enclosing class:
- DatabaseOptions
public static enum DatabaseOptions.TransactionIsolation extends java.lang.Enum<DatabaseOptions.TransactionIsolation>
Different types of transaction isolation supported by Stardog.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description SERIALIZABLE
Serializable transactions provides the highest level of isolation between transactions by acquiring an exclusive lock at the beginning of a transaction.SNAPSHOT
Snapsot isolation is when each transaction reads from a snapshot of the database when the transaction started.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DatabaseOptions.TransactionIsolation
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static DatabaseOptions.TransactionIsolation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SNAPSHOT
public static final DatabaseOptions.TransactionIsolation SNAPSHOT
Snapsot isolation is when each transaction reads from a snapshot of the database when the transaction started. This isolation level provides highest throughput by allowing concurrent transactions to continue. But at commit time, the changes made in a transaction are applied to the latest version of the database contents which might have changed after the transaction started.
-
SERIALIZABLE
public static final DatabaseOptions.TransactionIsolation SERIALIZABLE
Serializable transactions provides the highest level of isolation between transactions by acquiring an exclusive lock at the beginning of a transaction. Therefore, any value read in a transaction is guaranteed to hold at commit time as well. Exclusive locks reduce the throughput of concurrent write transactions.
-
-
Method Detail
-
values
public static DatabaseOptions.TransactionIsolation[] 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 (DatabaseOptions.TransactionIsolation c : DatabaseOptions.TransactionIsolation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DatabaseOptions.TransactionIsolation valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-