public class Coordinator extends Object implements Resource, Finally, TimerRemovalListener<Resource>
Resource.Result| 构造器和说明 |
|---|
Coordinator(XidImpl xid,
boolean hasSuper)
Instantiates a new Coordinator.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
addCoordinators(Resource resource)
Add coordinators boolean.
|
void |
commit()
Commit.
|
XaState |
getState()
Gets state.
|
HmilyTimer<Resource> |
getTimer()
Gets timer.
|
void |
onePhaseCommit()
1 pc .
|
void |
onRemoval(Resource value,
Long expire,
Long elapsed)
通知能数.
|
Resource.Result |
prepare()
2pc phase 1.
|
void |
rollback()
Rollback.
|
void |
setRollbackOnly()
Sets rollback only.
|
public Coordinator(XidImpl xid, boolean hasSuper)
xid - the xidhasSuper - the has superpublic HmilyTimer<Resource> getTimer()
public Resource.Result prepare()
Resourcepublic void rollback()
throws RemoteException
Resourcerollback 在接口中 Finallyrollback 在接口中 ResourceRemoteException - the remote exceptionpublic void commit()
throws RemoteException
Resourcecommit 在接口中 Finallycommit 在接口中 ResourceTransactionRolledbackException - the transaction rolledback exceptionRemoteException - the remote exceptionpublic void onePhaseCommit()
throws RemoteException
ResourceonePhaseCommit 在接口中 ResourceRemoteException - the remote exceptionpublic XaState getState()
public boolean addCoordinators(Resource resource)
resource - the remotepublic void setRollbackOnly()
public void onRemoval(Resource value, Long expire, Long elapsed)
TimerRemovalListeneronRemoval 在接口中 TimerRemovalListener<Resource>value - valueexpire - 默认等待时间;elapsed - 运行了多少时间;Copyright © 2022 dromara. All rights reserved.