From d479253768d296a40b4f699e1de9b03c7146a97a Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Tue, 3 Dec 2013 14:03:28 -0800 Subject: Adding javadocs and Carbonado User Guide --- apidocs/com/amazon/carbonado/IsolationLevel.html | 510 +++++++++++++++++++++++ 1 file changed, 510 insertions(+) create mode 100644 apidocs/com/amazon/carbonado/IsolationLevel.html (limited to 'apidocs/com/amazon/carbonado/IsolationLevel.html') diff --git a/apidocs/com/amazon/carbonado/IsolationLevel.html b/apidocs/com/amazon/carbonado/IsolationLevel.html new file mode 100644 index 0000000..e79cf52 --- /dev/null +++ b/apidocs/com/amazon/carbonado/IsolationLevel.html @@ -0,0 +1,510 @@ + + + + + + +IsolationLevel (Carbonado 1.2.3 API) + + + + + + + +
+ + + + + +
+ + + +
+
com.amazon.carbonado
+

Enum IsolationLevel

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<IsolationLevel>
    +
    +
    +
    +
    public enum IsolationLevel
    +extends java.lang.Enum<IsolationLevel>
    +
    Describes a transaction isolation level. Transaction levels, in order from + lowest to highest are: + + + + A transaction's isolation level is usually READ_COMMITTED or + REPEATABLE_READ by default. Forcing a lower level, like + READ_COMMITTED, is useful when performing a long cursor + iteration. It releases locks during iteration rather than holding on to them + until the transaction exits. + +

    SNAPSHOT isolation is special in that it uses multiversion + concurrency control (MVCC). A commit may fail with an OptimisticLockException. Few repositories are expected to support this + level, however.

    +
    Author:
    +
    Brian S O'Neill
    +
    See Also:
    Repository.enterTransaction(IsolationLevel), +Transaction
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + + + + + + + + + + +
      Enum Constants 
      Enum Constant and Description
      NONE +
      Indicates that no actual transaction is in progress.
      +
      READ_COMMITTED +
      Indicates that dirty reads are prevented.
      +
      READ_UNCOMMITTED +
      Indicates that dirty reads, non-repeatable reads and phantom reads can + occur.
      +
      REPEATABLE_READ +
      Indicates that dirty reads and non-repeatable reads are prevented.
      +
      SERIALIZABLE +
      Indicates that dirty reads, non-repeatable reads and phantom reads are + prevented.
      +
      SNAPSHOT +
      Indicates that dirty reads, non-repeatable reads and phantom reads are + prevented.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      IsolationLevelhighestCommon(IsolationLevel level) +
      Returns the highest common isolation level between this and the one + given.
      +
      booleanisAtLeast(IsolationLevel level) +
      Returns true if this isolation level is at least as high as the one + given.
      +
      booleanisAtMost(IsolationLevel level) +
      Returns true if this isolation level is no higher than the one given.
      +
      IsolationLevellowestCommon(IsolationLevel level) +
      Returns the lowest common isolation level between this and the one + given.
      +
      static IsolationLevelvalueOf(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static IsolationLevel[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Enum Constant Detail

      + + + +
        +
      • +

        NONE

        +
        public static final IsolationLevel NONE
        +
        Indicates that no actual transaction is in progress. If this level is + specified when entering a transaction, it uses auto-commit mode.
        +
      • +
      + + + +
        +
      • +

        READ_UNCOMMITTED

        +
        public static final IsolationLevel READ_UNCOMMITTED
        +
        Indicates that dirty reads, non-repeatable reads and phantom reads can + occur. This level allows modifications by one transaction to be read by + another transaction before any changes have been committed (a "dirty + read"). If any of the changes are rolled back, the second transaction + will have retrieved an invalid modification. + +

        This level is also known as degree 1 isolation.

        +
      • +
      + + + +
        +
      • +

        READ_COMMITTED

        +
        public static final IsolationLevel READ_COMMITTED
        +
        Indicates that dirty reads are prevented. Non-repeatable reads and + phantom reads can occur. This level only prohibits a transaction from + reading modifications with uncommitted changes in it. + +

        This level is also known as degree 2 isolation.

        +
      • +
      + + + +
        +
      • +

        REPEATABLE_READ

        +
        public static final IsolationLevel REPEATABLE_READ
        +
        Indicates that dirty reads and non-repeatable reads are prevented. + Phantom reads can occur. This level prohibits a transaction from reading + uncommitted changes, and it also prohibits the situation where one + transaction reads a record, a second transaction alters the record, and + the first transaction rereads the record, getting different values the + second time (a "non-repeatable read").
        +
      • +
      + + + +
        +
      • +

        SNAPSHOT

        +
        public static final IsolationLevel SNAPSHOT
        +
        Indicates that dirty reads, non-repeatable reads and phantom reads are + prevented. Commits can still fail however, as snapshot isolation avoids + using locks.
        +
      • +
      + + + +
        +
      • +

        SERIALIZABLE

        +
        public static final IsolationLevel SERIALIZABLE
        +
        Indicates that dirty reads, non-repeatable reads and phantom reads are + prevented. Phantoms are records returned as a result of a search, but + which were not seen by the same transaction when the identical search + criteria was previously used. For example, another transaction may have + inserted records which match the original search. + +

        This level is also known as degree 3 isolation.

        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static IsolationLevel[] 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 (IsolationLevel c : IsolationLevel.values())
        +    System.out.println(c);
        +
        +
        Returns:
        an array containing the constants of this enum type, in +the order they are declared
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static IsolationLevel 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 name
        +
        java.lang.NullPointerException - if the argument is null
        +
      • +
      + + + +
        +
      • +

        isAtLeast

        +
        public boolean isAtLeast(IsolationLevel level)
        +
        Returns true if this isolation level is at least as high as the one + given.
        +
      • +
      + + + +
        +
      • +

        isAtMost

        +
        public boolean isAtMost(IsolationLevel level)
        +
        Returns true if this isolation level is no higher than the one given.
        +
      • +
      + + + +
        +
      • +

        lowestCommon

        +
        public IsolationLevel lowestCommon(IsolationLevel level)
        +
        Returns the lowest common isolation level between this and the one + given.
        +
      • +
      + + + +
        +
      • +

        highestCommon

        +
        public IsolationLevel highestCommon(IsolationLevel level)
        +
        Returns the highest common isolation level between this and the one + given.
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + +
+ + +

Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.

+ + -- cgit v1.2.3