public class BusinessActionContext extends Object implements Serializable
| 构造器和说明 |
|---|
BusinessActionContext()
Instantiates a new Business action context.
|
BusinessActionContext(String xid,
String branchId,
Map<String,Object> actionContext)
Instantiates a new Business action context.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
addActionContext(String key,
Object value)
已过时。
Don't use this method in the `Try` method. Please use
BusinessActionContextUtil.addContext(java.lang.String, java.lang.Object) |
Map<String,Object> |
getActionContext()
Gets action context.
|
Object |
getActionContext(String key)
Gets action context.
|
<T> T |
getActionContext(String key,
Class<T> targetClazz)
Gets action context.
|
String |
getActionName()
Gets action name.
|
long |
getBranchId()
Gets branch id.
|
Boolean |
getDelayReport() |
Boolean |
getUpdated() |
String |
getXid()
Gets xid.
|
void |
setActionContext(Map<String,Object> actionContext)
Sets action context.
|
void |
setActionName(String actionName)
Sets action name.
|
void |
setBranchId(long branchId)
Sets branch id.
|
void |
setBranchId(String branchId)
Sets branch id.
|
void |
setDelayReport(Boolean delayReport) |
void |
setUpdated(Boolean updated) |
void |
setXid(String xid)
Sets xid.
|
String |
toString() |
public BusinessActionContext()
@Nullable public Object getActionContext(String key)
key - the key@Nullable public <T> T getActionContext(String key, @Nonnull Class<T> targetClazz)
T - the target typekey - the keytargetClazz - the target classpublic long getBranchId()
public void setBranchId(long branchId)
branchId - the branch idpublic void setBranchId(String branchId)
branchId - the branch idpublic Map<String,Object> getActionContext()
public void setActionContext(Map<String,Object> actionContext)
actionContext - the action contextpublic String getXid()
public void setXid(String xid)
xid - the xidpublic String getActionName()
public void setActionName(String actionName)
actionName - the action name@Deprecated public boolean addActionContext(String key, Object value)
BusinessActionContextUtil.addContext(java.lang.String, java.lang.Object)key - the action context's keyvalue - biz value// the TCC API utilspublic Boolean getDelayReport()
public void setDelayReport(Boolean delayReport)
public Boolean getUpdated()
public void setUpdated(Boolean updated)
Copyright © 2022 Seata. All rights reserved.