org.hypergraphdb.transaction
Interface HGTransactionContext


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 and HGTransactionManager.threadDetach methods.

Author:
Borislav Iordanov

Method Summary
 void beginTransaction()
           
 void endAll(boolean success)
           
 void endTransaction(boolean success)
           
 HGTransaction getCurrent()
           
 

Method Detail

getCurrent

HGTransaction getCurrent()

beginTransaction

void beginTransaction()

endTransaction

void endTransaction(boolean success)
                    throws HGTransactionException
Throws:
HGTransactionException

endAll

void endAll(boolean success)
            throws HGTransactionException
Throws:
HGTransactionException