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

java.lang.Object
  extended by org.apache.hadoop.hbase.client.transactional.HBaseBackedTransactionLogger
All Implemented Interfaces:
TransactionLogger

public class HBaseBackedTransactionLogger
extends Object
implements TransactionLogger


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.client.transactional.TransactionLogger
TransactionLogger.TransactionStatus
 
Field Summary
static String TABLE_NAME
          The name of the transaction status table.
 
Constructor Summary
HBaseBackedTransactionLogger()
           
 
Method Summary
 long createNewTransactionLog()
          Create a new transaction log.
static void createTable()
          Create the table.
 void forgetTransaction(long transactionId)
           
 TransactionLogger.TransactionStatus getStatusForTransaction(long transactionId)
           
 void setStatusForTransaction(long transactionId, TransactionLogger.TransactionStatus status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLE_NAME

public static final String TABLE_NAME
The name of the transaction status table.

See Also:
Constant Field Values
Constructor Detail

HBaseBackedTransactionLogger

public HBaseBackedTransactionLogger()
                             throws IOException
Throws:
IOException
Method Detail

createTable

public static void createTable()
                        throws IOException
Create the table.

Throws:
IOException

createNewTransactionLog

public long createNewTransactionLog()
Description copied from interface: TransactionLogger
Create a new transaction log. Return the transaction's globally unique id. Log's initial value should be PENDING

Specified by:
createNewTransactionLog in interface TransactionLogger
Returns:
transaction id

getStatusForTransaction

public TransactionLogger.TransactionStatus getStatusForTransaction(long transactionId)
Specified by:
getStatusForTransaction in interface TransactionLogger
Returns:
transaction status

setStatusForTransaction

public void setStatusForTransaction(long transactionId,
                                    TransactionLogger.TransactionStatus status)
Specified by:
setStatusForTransaction in interface TransactionLogger

forgetTransaction

public void forgetTransaction(long transactionId)


Copyright © 2009 The Apache Software Foundation