com.taobao.metamorphosis.server.transaction
类 Transaction

java.lang.Object
  继承者 com.taobao.metamorphosis.server.transaction.Transaction
所有已实现的接口:
Serializable
直接已知子类:
LocalTransaction, XATransaction

public abstract class Transaction
extends Object
implements Serializable

事务基类

作者:
boyan(boyan@taobao.com)
另请参见:
序列化表格

字段摘要
static byte FINISHED_STATE
           
static byte HEURISTIC_COMMIT_STATE
           
static byte HEURISTIC_COMPLETE_STATE
           
static byte HEURISTIC_ROLLBACK_STATE
           
static byte IN_USE_STATE
           
static byte PREPARED_STATE
           
static byte START_STATE
           
 
构造方法摘要
Transaction()
           
 
方法摘要
protected  void cancelTimeout()
           
abstract  void commit(boolean onePhase)
           
abstract  org.apache.commons.logging.Log getLog()
           
 byte getState()
           
 com.taobao.gecko.service.timer.Timeout getTimeoutRef()
           
abstract  TransactionId getTransactionId()
           
 boolean isPrepared()
           
abstract  int prepare()
           
 void prePrepare()
           
abstract  void rollback()
           
 void setState(byte state)
           
 void setTimeoutRef(com.taobao.gecko.service.timer.Timeout timeoutRef)
           
 void setTransactionInUse()
          设置事务正在被使用中
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

START_STATE

public static final byte START_STATE
另请参见:
常量字段值

IN_USE_STATE

public static final byte IN_USE_STATE
另请参见:
常量字段值

PREPARED_STATE

public static final byte PREPARED_STATE
另请参见:
常量字段值

FINISHED_STATE

public static final byte FINISHED_STATE
另请参见:
常量字段值

HEURISTIC_COMMIT_STATE

public static final byte HEURISTIC_COMMIT_STATE
另请参见:
常量字段值

HEURISTIC_ROLLBACK_STATE

public static final byte HEURISTIC_ROLLBACK_STATE
另请参见:
常量字段值

HEURISTIC_COMPLETE_STATE

public static final byte HEURISTIC_COMPLETE_STATE
另请参见:
常量字段值
构造方法详细信息

Transaction

public Transaction()
方法详细信息

getState

public byte getState()

getTimeoutRef

public com.taobao.gecko.service.timer.Timeout getTimeoutRef()

setTimeoutRef

public void setTimeoutRef(com.taobao.gecko.service.timer.Timeout timeoutRef)

setState

public void setState(byte state)

setTransactionInUse

public void setTransactionInUse()
设置事务正在被使用中


cancelTimeout

protected void cancelTimeout()

prePrepare

public void prePrepare()
                throws Exception
抛出:
Exception

commit

public abstract void commit(boolean onePhase)
                     throws XAException,
                            IOException
抛出:
XAException
IOException

rollback

public abstract void rollback()
                       throws XAException,
                              IOException
抛出:
XAException
IOException

prepare

public abstract int prepare()
                     throws XAException,
                            IOException
抛出:
XAException
IOException

getTransactionId

public abstract TransactionId getTransactionId()

getLog

public abstract org.apache.commons.logging.Log getLog()

isPrepared

public boolean isPrepared()


Copyright © 2010–2013. All rights reserved.