|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.multiverse.api.ThreadLocalTransaction
public final class ThreadLocalTransaction
A ThreadLocal that contains the current Transaction. The Stm and the Transaction
should not rely on threadlocals, they are only used for convenience to reduce the need to carry around a
Transaction.
| Field Summary | |
|---|---|
static ThreadLocal<Transaction> |
threadlocal
|
| Method Summary | |
|---|---|
static void |
clearThreadLocalTransaction()
Clears the threadlocal transaction. |
static Transaction |
getRequiredThreadLocalTransaction()
Gets the threadlocal transaction or throws a NoTransactionException if no transaction is found. |
static Transaction |
getThreadLocalTransaction()
Gets the threadlocal transaction. |
static void |
setThreadLocalTransaction(Transaction tx)
Sets the threadlocal transaction. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ThreadLocal<Transaction> threadlocal
| Method Detail |
|---|
public static Transaction getThreadLocalTransaction()
public static Transaction getRequiredThreadLocalTransaction()
NoTransactionFoundException - if no thread local transaction is found.public static void clearThreadLocalTransaction()
public static void setThreadLocalTransaction(Transaction tx)
tx - the new thread local transaction.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||