|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.multiverse.api.StmUtils
public final class StmUtils
A utility class with convenience methods to access the Stm or
Transaction. These methods can be imported using the static import for a less
ugly (but potentially more confusing) syntax.
| Method Summary | |
|---|---|
static void |
abort()
Aborts the Transaction in the ThreadLocalTransaction transaction. |
static void |
commit()
Commits the Transaction in the ThreadLocalTransaction transaction. |
static void |
prepare()
Prepares the Transaction in the ThreadLocalTransaction transaction. |
static void |
retry()
Does a retry. |
static void |
scheduleCompensatingTask(java.lang.Runnable task)
Scheduled an compensating task on the Transaction in the ThreadLocalTransaction. |
static void |
scheduleDeferredTask(java.lang.Runnable task)
Scheduled an deferred task on the Transaction in the ThreadLocalTransaction. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void retry()
NoTransactionFoundException - if no transaction is found in the ThreadLocalTransaction.public static void prepare()
Transaction.prepare().
public static void abort()
Transaction.abort() ()}.
public static void commit()
Transaction.abort() ()}.
public static void scheduleDeferredTask(java.lang.Runnable task)
Transaction.registerLifecycleListener(TransactionLifecycleListener).
task - the deferred task to execute.
java.lang.NullPointerException - if task is null.public static void scheduleCompensatingTask(java.lang.Runnable task)
Transaction.registerLifecycleListener(TransactionLifecycleListener).
task - the deferred task to execute.
java.lang.NullPointerException - if task is null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||