public class TransactionImpl extends Object implements Transaction, TimerRemovalListener<Resource>
| 限定符和类型 | 方法和说明 |
|---|---|
void |
commit() |
TransactionImpl |
createSubTransaction()
创建一个子任务.
|
boolean |
delistResource(XAResource xaResource,
int flag) |
void |
doDeList(int flag)
Do de list.
|
void |
doEnList(XAResource xaResource,
int flag)
Do en list.
|
boolean |
enlistResource(XAResource xaResource) |
TransactionContext |
getContext()
Gets context.
|
int |
getStatus() |
XidImpl |
getXid()
Gets xid.
|
void |
onRemoval(Resource value,
Long expire,
Long elapsed)
通知能数.
|
void |
registerSynchronization(Synchronization synchronization) |
void |
rollback() |
void |
setRollbackOnly() |
public void commit()
throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
SecurityException,
IllegalStateException,
SystemException
public void doEnList(XAResource xaResource, int flag) throws SystemException, RollbackException
xaResource - the xa resourceflag - the flagSystemException - the system exceptionRollbackException - the rollback exceptionpublic void doDeList(int flag)
throws SystemException
flag - the flagSystemException - the system exceptionpublic boolean delistResource(XAResource xaResource, int flag) throws IllegalStateException, SystemException
delistResource 在接口中 TransactionIllegalStateExceptionSystemExceptionpublic boolean enlistResource(XAResource xaResource) throws RollbackException, IllegalStateException, SystemException
public int getStatus()
throws SystemException
getStatus 在接口中 TransactionSystemExceptionpublic void registerSynchronization(Synchronization synchronization) throws RollbackException, IllegalStateException, SystemException
public void rollback()
throws IllegalStateException,
SystemException
rollback 在接口中 TransactionIllegalStateExceptionSystemExceptionpublic void setRollbackOnly()
throws IllegalStateException,
SystemException
setRollbackOnly 在接口中 TransactionIllegalStateExceptionSystemExceptionpublic XidImpl getXid()
public TransactionContext getContext()
public TransactionImpl createSubTransaction()
public void onRemoval(Resource value, Long expire, Long elapsed)
TimerRemovalListeneronRemoval 在接口中 TimerRemovalListener<Resource>value - valueexpire - 默认等待时间;elapsed - 运行了多少时间;Copyright © 2022 dromara. All rights reserved.