public enum IsolationLevels extends Enum<IsolationLevels> implements IsolationLevel
IsolationLevel
s supported by Sesame. Note
that Sesame stores are not required to support all levels, consult the
documentatation for the specific SAIL implementation you are using to find
out which levels are supported.Enum Constant and Description |
---|
NONE
None: the lowest isolation level; transactions can see their own changes,
but may not be able to roll them back and no support for isolation among
transactions is guaranteed
|
READ_COMMITTED
Read Committed: in this isolation level only statements from other
transactions that have been committed (at some point) can be seen by this
transaction.
|
READ_UNCOMMITTED
Read Uncommitted: transactions can be rolled back, but not necessarily
isolated: concurrent transactions might see each other's uncommitted data
(so-called 'dirty reads')
|
SERIALIZABLE
Serializable: in addition to
SNAPSHOT , this isolation level
requires that all other successful transactions must appear to occur
either completely before or completely after a successful serializable
transaction. |
SNAPSHOT
Snapshot: in addition to
SNAPSHOT_READ , successful transactions
in this isolation level will operate against a particular dataset
snapshot. |
SNAPSHOT_READ
Snapshot Read: in addition to
READ_COMMITTED , query results in
this isolation level that are observed within a successful transaction
will observe a consistent snapshot. |
Modifier and Type | Method and Description |
---|---|
static IsolationLevel |
getCompatibleIsolationLevel(IsolationLevel level,
List<? extends IsolationLevel> supportedLevels)
Determines the first compatible isolation level in the list of supported
levels, for the given level.
|
URI |
getURI()
Get a URI uniquely representing this isolation level.
|
boolean |
isCompatibleWith(IsolationLevel otherLevel)
Verifies if this transaction isolation level is compatible with the
supplied other isolation level - that is, if this transaction isolation
level offers at least the same guarantees as the other level.
|
static IsolationLevels |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static IsolationLevels[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final IsolationLevels NONE
public static final IsolationLevels READ_UNCOMMITTED
public static final IsolationLevels READ_COMMITTED
public static final IsolationLevels SNAPSHOT_READ
READ_COMMITTED
, query results in
this isolation level that are observed within a successful transaction
will observe a consistent snapshot. Changes to the data occurring while a
query is evaluated will not affect that query result.public static final IsolationLevels SNAPSHOT
SNAPSHOT_READ
, successful transactions
in this isolation level will operate against a particular dataset
snapshot. Transactions in this isolation level will see either the
complete effects of other transactions (consistently throughout) or not at
all.public static final IsolationLevels SERIALIZABLE
SNAPSHOT
, this isolation level
requires that all other successful transactions must appear to occur
either completely before or completely after a successful serializable
transaction.public static IsolationLevels[] values()
for (IsolationLevels c : IsolationLevels.values()) System.out.println(c);
public static IsolationLevels valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isCompatibleWith(IsolationLevel otherLevel)
IsolationLevel
isCompatibleWith
in interface IsolationLevel
otherLevel
- an other isolation level to check compatibility against.public static IsolationLevel getCompatibleIsolationLevel(IsolationLevel level, List<? extends IsolationLevel> supportedLevels)
level
- the IsolationLevel
for which to determine a compatible
level.supportedLevels
- a list of supported isolation levels from which to select the
closest compatible level.null
if no compatible level can
be found.IllegalArgumentException
- if either one of the input parameters is null
.public URI getURI()
IsolationLevel
getURI
in interface IsolationLevel
Copyright © 2001-2016 Aduna. All Rights Reserved.