Modifier and Type | Field and Description |
---|---|
protected DLIClient |
client |
static String |
JOB_TRANSACTION_ERROR_CODE |
Constructor and Description |
---|
BaseJob(DLIClient client) |
BaseJob(DLIClient client,
String transactionId) |
Modifier and Type | Method and Description |
---|---|
protected void |
apiExceptionRetryManage(int statusCode,
String serviceCode,
String errorMsg,
int currentTimes,
boolean mustRetry) |
protected <T> com.huawei.dli.restapi.ApiResponse<T> |
executeCall(IHttpExecAdpter<T> exec,
Class<T> resDtoClass,
Function<T,com.huawei.dli.restapi.model.GlobalErrorResponse> errorFetcher,
Function<T,String> transactionConflictManage) |
<T,V> T |
executeWithRetry(IHttpExecAdpter<T> exec,
Class<T> resDtoClass,
Function<T,com.huawei.dli.restapi.model.GlobalErrorResponse> errorFetcher,
Function<T,String> transactionConflictManage) |
String |
getTransactionId() |
protected abstract String |
getTransactionKeyName() |
protected boolean |
isServiceInsideError(int statusCode,
String serviceCode) |
void |
setTransactionId(String transactionId) |
public static final String JOB_TRANSACTION_ERROR_CODE
protected DLIClient client
public BaseJob(DLIClient client)
protected abstract String getTransactionKeyName()
public <T,V> T executeWithRetry(IHttpExecAdpter<T> exec, Class<T> resDtoClass, Function<T,com.huawei.dli.restapi.model.GlobalErrorResponse> errorFetcher, Function<T,String> transactionConflictManage) throws DLIException, InterruptedException
DLIException
InterruptedException
protected <T> com.huawei.dli.restapi.ApiResponse<T> executeCall(IHttpExecAdpter<T> exec, Class<T> resDtoClass, Function<T,com.huawei.dli.restapi.model.GlobalErrorResponse> errorFetcher, Function<T,String> transactionConflictManage) throws DLIException, com.huawei.dli.restapi.ApiException
DLIException
com.huawei.dli.restapi.ApiException
protected void apiExceptionRetryManage(int statusCode, String serviceCode, String errorMsg, int currentTimes, boolean mustRetry) throws DLIException, InterruptedException
DLIException
InterruptedException
protected boolean isServiceInsideError(int statusCode, String serviceCode)
public String getTransactionId()
public void setTransactionId(String transactionId)
Copyright © 2023. All rights reserved.