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)
- 另请参见:
- 序列化表格
从类 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.