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 --- .../com/amazon/carbonado/txn/TransactionScope.html | 392 +++++++++++++++++++++ 1 file changed, 392 insertions(+) create mode 100644 apidocs/com/amazon/carbonado/txn/TransactionScope.html (limited to 'apidocs/com/amazon/carbonado/txn/TransactionScope.html') diff --git a/apidocs/com/amazon/carbonado/txn/TransactionScope.html b/apidocs/com/amazon/carbonado/txn/TransactionScope.html new file mode 100644 index 0000000..20f215b --- /dev/null +++ b/apidocs/com/amazon/carbonado/txn/TransactionScope.html @@ -0,0 +1,392 @@ + + + + + + +TransactionScope (Carbonado 1.2.3 API) + + + + + + + +
+ + + + + +
+ + + +
+
com.amazon.carbonado.txn
+

Class TransactionScope<Txn>

+
+
+ +
+
    +
  • +
    Type Parameters:
    Txn - Transaction implementation
    +
    +
    +
    public class TransactionScope<Txn>
    +extends java.lang.Object
    +
    Container of thread local, scoped transactions.
    +
    Since:
    +
    1.2
    +
    Author:
    +
    Brian S O'Neill
    +
    See Also:
    TransactionManager
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      voidattach() +
      Attach this scope to the current thread, if it has been detached.
      +
      Transactionenter(IsolationLevel level) +
      Enters a new transaction scope which becomes the active transaction.
      +
      TransactionenterTop(IsolationLevel level) +
      Enters a new top-level transaction scope which becomes the active + transaction.
      +
      IsolationLevelgetIsolationLevel() +
      Returns the isolation level of the active transaction, or null if there + is no active transaction.
      +
      java.util.concurrent.locks.LockgetLock() +
      Returns lock used by TransactionScope.
      +
      TxngetTxn() +
      Returns the implementation for the active transaction, or null if there + is no active transaction.
      +
      booleanisForUpdate() +
      Returns true if an active transaction exists and it is for update.
      +
      <S extends Storable
      void
      register(java.lang.Class<S> type, + Cursor<S> cursor) +
      Registers the given cursor against the active transaction, allowing it + to be closed on transaction exit or transaction manager close.
      +
      <S extends Storable
      void
      unregister(java.lang.Class<S> type, + Cursor<S> cursor) +
      Unregisters a previously registered cursor.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        enter

        +
        public Transaction enter(IsolationLevel level)
        +
        Enters a new transaction scope which becomes the active transaction.
        +
        Parameters:
        level - desired isolation level (may be null)
        +
        Throws:
        +
        java.lang.UnsupportedOperationException - if isolation level higher than + supported by repository
        +
      • +
      + + + +
        +
      • +

        enterTop

        +
        public Transaction enterTop(IsolationLevel level)
        +
        Enters a new top-level transaction scope which becomes the active + transaction.
        +
        Parameters:
        level - desired isolation level (may be null)
        +
        Throws:
        +
        java.lang.UnsupportedOperationException - if isolation level higher than + supported by repository
        +
      • +
      + + + +
        +
      • +

        register

        +
        public <S extends Storable> void register(java.lang.Class<S> type,
        +                                 Cursor<S> cursor)
        +
        Registers the given cursor against the active transaction, allowing it + to be closed on transaction exit or transaction manager close. If there + is no active transaction in scope, the cursor is registered as not part + of a transaction. Cursors should register when created.
        +
      • +
      + + + +
        +
      • +

        unregister

        +
        public <S extends Storable> void unregister(java.lang.Class<S> type,
        +                                   Cursor<S> cursor)
        +
        Unregisters a previously registered cursor. Cursors should unregister + when closed.
        +
      • +
      + + + +
        +
      • +

        getLock

        +
        public java.util.concurrent.locks.Lock getLock()
        +
        Returns lock used by TransactionScope. While holding lock, operations + are suspended.
        +
      • +
      + + + +
        +
      • +

        getTxn

        +
        public Txn getTxn()
        +           throws java.lang.Exception
        +
        Returns the implementation for the active transaction, or null if there + is no active transaction.
        +
        Throws:
        +
        java.lang.Exception - thrown by createTxn or reuseTxn
        +
      • +
      + + + +
        +
      • +

        isForUpdate

        +
        public boolean isForUpdate()
        +
        Returns true if an active transaction exists and it is for update.
        +
      • +
      + + + +
        +
      • +

        getIsolationLevel

        +
        public IsolationLevel getIsolationLevel()
        +
        Returns the isolation level of the active transaction, or null if there + is no active transaction.
        +
      • +
      + + + +
        +
      • +

        attach

        +
        public void attach()
        +
        Attach this scope to the current thread, if it has been detached.
        +
        Throws:
        +
        java.lang.IllegalStateException - if current thread has a different + transaction already attached
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + +
+ + +

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

+ + -- cgit v1.2.3