Skip navigation links
com.tangosol.coherence.transaction
Class Isolation
java.lang.Object
java.lang.Enum
com.tangosol.coherence.transaction.Isolation
- All Implemented Interfaces:
- Serializable, Comparable
-
public class Isolation
- extends Enum
Coherence transaction isolation levels.
- Since:
- Coherence 3.6
- Author:
- js 2009.02.01
READ_COMMITTED
public static final Isolation READ_COMMITTED
- Read Committed isolation. <p/> This is the default isolation level if no level is specified. This isolation level guarantees that only committed data is visible and doesn't provide any consistency guarantees. Reads are guaranteed to be monotonic. All writes acquire a write lock and reads do not acquire any lock. Any attempt to write to a locked entry will result in an exception; the request will not block. This is the weakest of the isolation levels and will generally be the most performant at the cost of read consistency.
STMT_CONSISTENT_READ
public static final Isolation STMT_CONSISTENT_READ
- Statement Consistent Read isolation. <p/> Provides statement scoped read consistency. This isolation level guarantees that all the data read by a single operation comes from a single point in time; the time that the statement began execution. Reads are not guaranteed to be monotonic. All writes acquire a write lock and reads do not acquire any lock. Any attempt to write to a locked entry will result in an exception; the request will not block.
TX_CONSISTENT_READ
public static final Isolation TX_CONSISTENT_READ
- Transaction Consistent Read isolation. <p/> Provides transaction scoped read consistency. This isolation level guarantees that all the data read in a transaction comes from a single point in time; the time that the transaction began. Reads are not guaranteed to be monotonic. All writes acquire a write lock and reads do not acquire any lock. Any attempt to write to a locked entry will result in an exception; the request will not block. <p/> Read operations with this isolation level may produce a
VersionNotAvailableException
if attempting to read a historical version of the data that is no longer available in storage.
STMT_MONOTONIC_CONSISTENT_READ
public static final Isolation STMT_MONOTONIC_CONSISTENT_READ
- Statement Monotonic Consistent Read isolation. <p/> Provides statement scoped read consistency and monotonic reads. This isolation level guarantees that all data read by a single operation comes from a single point in time; the time that the statement began execution. Reads are guaranteed to be monotonic. This means that a read is guaranteed to return a version that is equal to or greater than any version that was previously encountered while using the connection. Due to the monotinic read guarantee, reads with this isolation may block until the necessary versions are available. All writes acquire a write lock and reads do not acquire any lock. Any attempt to write to a locked entry will result in an exception; the request will not block waiting for a write lock.
TX_MONOTONIC_CONSISTENT_READ
public static final Isolation TX_MONOTONIC_CONSISTENT_READ
- Transaction Monotonic Consistent Read isolation. <p/> Provides transaction scoped read consistency and monotonic reads. This isolation level guarantees that all data read by a single operation comes from a single point in time; the time that the transaction began. Reads are guaranteed to be monotonic. This means that a read is guaranteed to return a version that is equal to or greater than any version that was previously encountered while using the connection. Due to the monotinic read guarantee, the initial read in a transaction with this isolation may block until the necessary versions are available. All writes acquire a write lock and reads do not acquire any lock. Any attempt to write to a locked entry will result in an exception; the request will not block waiting for a write lock. <p/> Read operations with this isolation level may produce a
VersionNotAvailableException
if attempting to read a historical version of the data that is no longer available in storage.
values
public static final Isolation[] values()
valueOf
public static Isolation valueOf(String name)
isConsistent
public abstract boolean isConsistent()
- Returns whether the isolation level guaranteed consistent reads.
-
- Returns:
- true if consistent reads are guaranteed, false otherwise
isMonotonic
public abstract boolean isMonotonic()
- Returns whether the isolation level guarantees monotonic reads.
-
- Returns:
- true if monotonic reads are guaranteed, false otherwise
toString
public String toString()
- Return a human-readable description for this Isolation.
-
- Overrides:
toString
in class Enum
-
- Returns:
- a String description of the Isolation
Skip navigation links
Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.