org.apache.hadoop.hbase.client.transactional
Class TransactionManager

java.lang.Object
  extended by org.apache.hadoop.hbase.client.transactional.TransactionManager

public class TransactionManager
extends Object

Transaction Manager. Responsible for committing transactions.


Constructor Summary
TransactionManager(HBaseConfiguration conf)
           
TransactionManager(TransactionLogger transactionLogger, HBaseConfiguration conf)
           
 
Method Summary
 void abort(TransactionState transactionState)
          Abort a s transaction.
 TransactionState beginTransaction()
          Called to start a transaction.
 void doCommit(TransactionState transactionState)
          Do the commit.
 JtaXAResource getXAResource()
           
 int prepareCommit(TransactionState transactionState)
          Prepare to commit a transaction.
 void tryCommit(TransactionState transactionState)
          Try and commit a transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionManager

public TransactionManager(HBaseConfiguration conf)
Parameters:
conf -

TransactionManager

public TransactionManager(TransactionLogger transactionLogger,
                          HBaseConfiguration conf)
Parameters:
transactionLogger -
conf -
Method Detail

beginTransaction

public TransactionState beginTransaction()
Called to start a transaction.

Returns:
new transaction state

prepareCommit

public int prepareCommit(TransactionState transactionState)
                  throws CommitUnsuccessfulException,
                         IOException
Prepare to commit a transaction.

Parameters:
transactionState -
Returns:
commitStatusCode (see TransactionalRegionInterface)
Throws:
IOException
CommitUnsuccessfulException

tryCommit

public void tryCommit(TransactionState transactionState)
               throws CommitUnsuccessfulException,
                      IOException
Try and commit a transaction. This does both phases of the 2-phase protocol: prepare and commit.

Parameters:
transactionState -
Throws:
IOException
CommitUnsuccessfulException

doCommit

public void doCommit(TransactionState transactionState)
              throws CommitUnsuccessfulException
Do the commit. This is the 2nd phase of the 2-phase protocol.

Parameters:
transactionState -
Throws:
CommitUnsuccessfulException

abort

public void abort(TransactionState transactionState)
           throws IOException
Abort a s transaction.

Parameters:
transactionState -
Throws:
IOException

getXAResource

public JtaXAResource getXAResource()


Copyright © 2008 The Apache Software Foundation