Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


com.tangosol.coherence.transaction
Class Isolation

java.lang.Object
  extended by java.lang.Enum
      extended by com.tangosol.coherence.transaction.Isolation

All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class Isolation
extends java.lang.Enum

Coherence transaction isolation levels.

Since:
Coherence 3.6
Author:
js 2009.02.01

Field Summary
static Isolation READ_COMMITTED
          Read Committed isolation.
static Isolation STMT_CONSISTENT_READ
          Statement Consistent Read isolation.
static Isolation STMT_MONOTONIC_CONSISTENT_READ
          Statement Monotonic Consistent Read isolation.
static Isolation TX_CONSISTENT_READ
          Transaction Consistent Read isolation.
static Isolation TX_MONOTONIC_CONSISTENT_READ
          Transaction Monotonic Consistent Read isolation.

 

Method Summary
abstract  boolean isConsistent()
          Returns whether the isolation level guaranteed consistent reads.
abstract  boolean isMonotonic()
          Returns whether the isolation level guarantees monotonic reads.
 java.lang.String toString()
          Return a human-readable description for this Isolation.
static Isolation valueOf(java.lang.String name)
           
static Isolation[] values()
           

 

Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf

 

Field Detail

READ_COMMITTED

public static final Isolation READ_COMMITTED
Read Committed isolation.

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.

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.

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.

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.

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.

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.

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.

Method Detail

values

public static Isolation[] values()

valueOf

public static Isolation valueOf(java.lang.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 java.lang.String toString()
Return a human-readable description for this Isolation.
Overrides:
toString in class java.lang.Enum
Returns:
a String description of the Isolation

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.