public interface HGTransactionContext
A transaction context maintains a stack of nested transactions. The transaction
on top of the stack is the currently active transaction. A beginTransaction
will create and push a new transaction on the stack and an endTransaction
will remove the top of the transaction stack and commit or abort.
Transaction contexts are useful when implementing a server for HyperGraph. A context can
be bound to a client and then get dynamically attached/detach to worker threads using the
HGTransactionManager.threadAttach(HGTransactionContext)
and
HGTransactionManager.threadDetach()
methods.
Modifier and Type | Method and Description |
---|---|
void |
beginTransaction(HGTransactionConfig config) |
void |
endAll(boolean success) |
void |
endTransaction(boolean success) |
HGTransaction |
getCurrent() |
HGTransactionManager |
getManager() |
HGTransactionManager getManager()
HGTransaction getCurrent()
void beginTransaction(HGTransactionConfig config)
void endTransaction(boolean success) throws HGTransactionException
HGTransactionException
void endAll(boolean success) throws HGTransactionException
HGTransactionException
Copyright © 2015. All rights reserved.