public class SpringFenceHandler extends Object implements io.seata.integration.tx.api.fence.FenceHandler
| Constructor and Description |
|---|
SpringFenceHandler() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
commitFence(Method commitMethod,
Object targetTCCBean,
String xid,
Long branchId,
Object[] args)
common commit method enhanced
|
static boolean |
deleteFence(String xid,
Long branchId)
Delete Common Fence
|
int |
deleteFenceByDate(Date datetime)
Delete Common Fence By Datetime
|
static DataSource |
getDataSource() |
Object |
prepareFence(String xid,
Long branchId,
String actionName,
Callback<Object> targetCallback)
common prepare method enhanced
|
boolean |
rollbackFence(Method rollbackMethod,
Object targetTCCBean,
String xid,
Long branchId,
Object[] args,
String actionName)
Common rollback method enhanced
|
static void |
setDataSource(DataSource dataSource) |
static void |
setTransactionTemplate(org.springframework.transaction.support.TransactionTemplate transactionTemplate) |
public static DataSource getDataSource()
public static void setDataSource(DataSource dataSource)
public static void setTransactionTemplate(org.springframework.transaction.support.TransactionTemplate transactionTemplate)
public Object prepareFence(String xid, Long branchId, String actionName, Callback<Object> targetCallback)
prepareFence in interface io.seata.integration.tx.api.fence.FenceHandlerxid - the global transaction idbranchId - the branch transaction idactionName - the action nametargetCallback - the target callbackpublic boolean commitFence(Method commitMethod, Object targetTCCBean, String xid, Long branchId, Object[] args)
commitFence in interface io.seata.integration.tx.api.fence.FenceHandlercommitMethod - commit methodtargetTCCBean - target common beanxid - the global transaction idbranchId - the branch transaction idargs - commit method's parameterspublic boolean rollbackFence(Method rollbackMethod, Object targetTCCBean, String xid, Long branchId, Object[] args, String actionName)
rollbackFence in interface io.seata.integration.tx.api.fence.FenceHandlerrollbackMethod - rollback methodtargetTCCBean - target tcc beanxid - the global transaction idbranchId - the branch transaction idargs - rollback method's parametersactionName - the action namepublic static boolean deleteFence(String xid, Long branchId)
xid - the global transaction idbranchId - the branch transaction idpublic int deleteFenceByDate(Date datetime)
deleteFenceByDate in interface io.seata.integration.tx.api.fence.FenceHandlerdatetime - datetimeCopyright © 2023 Seata. All rights reserved.