docs: Add translations PowerJob-client.

This commit is contained in:
jiangjining 2021-01-07 19:44:25 +08:00
parent 281c53ad63
commit 36e258012e
4 changed files with 13 additions and 13 deletions

View File

@ -25,7 +25,7 @@ import java.util.Objects;
import static com.github.kfcfans.powerjob.client.TypeStore.*; import static com.github.kfcfans.powerjob.client.TypeStore.*;
/** /**
* OpenAPI 客户端 * OpenAPI Client.
* *
* @author tjq * @author tjq
* @since 2020/4/15 * @since 2020/4/15
@ -40,9 +40,9 @@ public class OhMyClient {
private static final String URL_PATTERN = "http://%s%s%s"; private static final String URL_PATTERN = "http://%s%s%s";
/** /**
* 初始化 OhMyClient 客户端 * Init OhMyClient with domain, appName and password.
* @param domain 比如 www.powerjob-server.com内网域名自行完成 DNS & Proxy * @param domain 比如 www.powerjob-server.com内网域名自行完成 DNS & Proxy
* @param appName 负责的应用名称 * @param appName name of the application
*/ */
public OhMyClient(String domain, String appName, String password) { public OhMyClient(String domain, String appName, String password) {
this(Lists.newArrayList(domain), appName, password); this(Lists.newArrayList(domain), appName, password);
@ -50,9 +50,9 @@ public class OhMyClient {
/** /**
* 初始化 OhMyClient 客户端 * nit OhMyClient with server address, appName and password.
* @param addressList IP:Port 列表 * @param addressList IP:Port address list
* @param appName 负责的应用名称 * @param appName name of the application
*/ */
public OhMyClient(List<String> addressList, String appName, String password) { public OhMyClient(List<String> addressList, String appName, String password) {
@ -199,7 +199,7 @@ public class OhMyClient {
return runJob(jobId, null, 0); return runJob(jobId, null, 0);
} }
/* ************* Instance ************* */ /* ************* Instance API list ************* */
/** /**
* 停止应用实例 * 停止应用实例
* @param instanceId 应用实例ID * @param instanceId 应用实例ID
@ -275,7 +275,7 @@ public class OhMyClient {
return JSONObject.parseObject(post, INSTANCE_RESULT_TYPE); return JSONObject.parseObject(post, INSTANCE_RESULT_TYPE);
} }
/* ************* Workflow ************* */ /* ************* Workflow API list ************* */
/** /**
* 保存工作流包括创建和修改 * 保存工作流包括创建和修改
* @param request 创建/修改 Workflow 请求 * @param request 创建/修改 Workflow 请求
@ -374,7 +374,7 @@ public class OhMyClient {
return runWorkflow(workflowId, null, 0); return runWorkflow(workflowId, null, 0);
} }
/* ************* Workflow Instance ************* */ /* ************* Workflow Instance API list ************* */
/** /**
* 停止应用实例 * 停止应用实例
* @param wfInstanceId 工作流实例ID * @param wfInstanceId 工作流实例ID

View File

@ -4,7 +4,7 @@ import com.alibaba.fastjson.TypeReference;
import com.github.kfcfans.powerjob.common.response.*; import com.github.kfcfans.powerjob.common.response.*;
/** /**
* 类型工厂 * TypeReference store.
* *
* @author tjq * @author tjq
* @since 11/7/20 * @since 11/7/20

View File

@ -12,7 +12,7 @@ import org.junit.jupiter.api.Test;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
/** /**
* 测试 Client * Test cases for {@link OhMyClient}
* *
* @author tjq * @author tjq
* @since 2020/4/15 * @since 2020/4/15
@ -110,7 +110,7 @@ public class TestClient {
ResultDTO<Long> startRes = ohMyClient.runJob(15L, "start by OhMyClient", 2000000); ResultDTO<Long> startRes = ohMyClient.runJob(15L, "start by OhMyClient", 2000000);
System.out.println("runJob result: " + JSONObject.toJSONString(startRes)); System.out.println("runJob result: " + JSONObject.toJSONString(startRes));
// 手动重启 server干掉时间轮中的调度数据 // Restart server manually and clear all the data in time wheeler.
TimeUnit.MINUTES.sleep(1); TimeUnit.MINUTES.sleep(1);
ResultDTO<Void> cancelRes = ohMyClient.cancelInstance(startRes.getData()); ResultDTO<Void> cancelRes = ohMyClient.cancelInstance(startRes.getData());

View File

@ -13,7 +13,7 @@ import org.junit.jupiter.api.Test;
import java.util.List; import java.util.List;
/** /**
* 测试 Clientworkflow部分 * Test cases for {@link OhMyClient} workflow.
* *
* @author tjq * @author tjq
* @since 2020/6/2 * @since 2020/6/2