public class TransactionalContext extends Object
Created by mwei on 1/11/16.
Constructor and Description |
---|
TransactionalContext() |
Modifier and Type | Method and Description |
---|---|
static AbstractTransactionalContext |
getCurrentContext()
Returns the current transactional context for the calling thread.
|
static AbstractTransactionalContext |
getRootContext()
Returns the last transactional context (parent/root) for the calling thread.
|
static Deque<AbstractTransactionalContext> |
getTransactionStack()
Returns the transaction stack for the calling thread.
|
static List<AbstractTransactionalContext> |
getTransactionStackAsList()
Get the transaction stack as a list.
|
static boolean |
isInNestedTransaction()
Whether or not the current thread is in a nested transaction.
|
static boolean |
isInTransaction()
Returns whether or not the calling thread is in a transaction.
|
static AbstractTransactionalContext |
newContext(AbstractTransactionalContext context)
Add a new transactional context to the thread's transaction stack.
|
static AbstractTransactionalContext |
removeContext()
Remove the most recent transaction context from the transaction stack.
|
public static boolean isInNestedTransaction()
public static Deque<AbstractTransactionalContext> getTransactionStack()
public static AbstractTransactionalContext getCurrentContext()
public static AbstractTransactionalContext getRootContext()
public static boolean isInTransaction()
public static AbstractTransactionalContext newContext(AbstractTransactionalContext context)
context
- The context to add to the transaction stack.public static AbstractTransactionalContext removeContext()
public static List<AbstractTransactionalContext> getTransactionStackAsList()
Copyright © 2019 CorfuDB. All rights reserved.