org.apache.hadoop.hbase.client.transactional
Interface TransactionLogger

All Known Implementing Classes:
HBaseBackedTransactionLogger, LocalTransactionLogger

public interface TransactionLogger

Simple interface used to provide a log about transaction status. Written to by the client, and read by regionservers in case of failure.


Nested Class Summary
static class TransactionLogger.TransactionStatus
          Transaction status values
 
Method Summary
 long createNewTransactionLog()
          Create a new transaction log.
 void forgetTransaction(long transactionId)
          This transaction's state is no longer needed.
 TransactionLogger.TransactionStatus getStatusForTransaction(long transactionId)
          Get the status of a transaction.
 void setStatusForTransaction(long transactionId, TransactionLogger.TransactionStatus status)
          Set the status for a transaction.
 

Method Detail

createNewTransactionLog

long createNewTransactionLog()
Create a new transaction log. Return the transaction's globally unique id. Log's initial value should be PENDING

Returns:
transaction id

getStatusForTransaction

TransactionLogger.TransactionStatus getStatusForTransaction(long transactionId)
Get the status of a transaction.

Parameters:
transactionId -
Returns:
transaction status

setStatusForTransaction

void setStatusForTransaction(long transactionId,
                             TransactionLogger.TransactionStatus status)
Set the status for a transaction.

Parameters:
transactionId -
status -

forgetTransaction

void forgetTransaction(long transactionId)
This transaction's state is no longer needed.

Parameters:
transactionId -


Copyright © 2010 The Apache Software Foundation