org.modeshape.jcr.txn

## Class SynchronizedTransactions.RollbackOnlyTransaction

- java.lang.Object
- - org.modeshape.jcr.txn.SynchronizedTransactions.RollbackOnlyTransaction

- All Implemented Interfaces:
    Transactions.Transaction
  Enclosing class:
    SynchronizedTransactions

      protected class SynchronizedTransactions.RollbackOnlyTransaction
      extends Object
      implements Transactions.Transaction

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SynchronizedTransactions.RollbackOnlyTransaction()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `commit()` Commit the transaction currently associated with the calling thread.
    `void` | `rollback()` Rolls back the transaction currently associated with the calling thread.
    `void` | `uponCompletion(Transactions.TransactionFunction function)` Register a function that will be called when the current transaction completes, or immediately if there is not currently an active transaction.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SynchronizedTransactions.RollbackOnlyTransaction

          public SynchronizedTransactions.RollbackOnlyTransaction()

  - ### Method Detail

    - #### commit

          public void commit()

      Description copied from interface: `Transactions.Transaction`
      Commit the transaction currently associated with the calling thread.
      Specified by:
        `commit` in interface `Transactions.Transaction`

    - #### rollback

          public void rollback()

      Description copied from interface: `Transactions.Transaction`
      Rolls back the transaction currently associated with the calling thread.
      Specified by:
        `rollback` in interface `Transactions.Transaction`

    - #### uponCompletion

          public void uponCompletion(Transactions.TransactionFunction function)

      Description copied from interface: `Transactions.Transaction`
      Register a function that will be called when the current transaction completes, or immediately if there is not currently an active transaction.
      Specified by:
        `uponCompletion` in interface `Transactions.Transaction`
      Parameters:
        `function` - the completion function

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.