From 36e258012efa069576ed2c962ddb73e9938794cf Mon Sep 17 00:00:00 2001 From: jiangjining Date: Thu, 7 Jan 2021 19:44:25 +0800 Subject: [PATCH] docs: Add translations PowerJob-client. --- .../kfcfans/powerjob/client/OhMyClient.java | 18 +++++++++--------- .../kfcfans/powerjob/client/TypeStore.java | 2 +- powerjob-client/src/test/java/TestClient.java | 4 ++-- .../src/test/java/TestWorkflow.java | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/powerjob-client/src/main/java/com/github/kfcfans/powerjob/client/OhMyClient.java b/powerjob-client/src/main/java/com/github/kfcfans/powerjob/client/OhMyClient.java index d7c3bfb4..72d0a788 100644 --- a/powerjob-client/src/main/java/com/github/kfcfans/powerjob/client/OhMyClient.java +++ b/powerjob-client/src/main/java/com/github/kfcfans/powerjob/client/OhMyClient.java @@ -25,7 +25,7 @@ import java.util.Objects; import static com.github.kfcfans.powerjob.client.TypeStore.*; /** - * OpenAPI 客户端 + * OpenAPI Client. * * @author tjq * @since 2020/4/15 @@ -40,9 +40,9 @@ public class OhMyClient { 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 appName 负责的应用名称 + * @param appName name of the application */ public OhMyClient(String domain, String appName, String password) { this(Lists.newArrayList(domain), appName, password); @@ -50,9 +50,9 @@ public class OhMyClient { /** - * 初始化 OhMyClient 客户端 - * @param addressList IP:Port 列表 - * @param appName 负责的应用名称 + * nit OhMyClient with server address, appName and password. + * @param addressList IP:Port address list + * @param appName name of the application */ public OhMyClient(List addressList, String appName, String password) { @@ -199,7 +199,7 @@ public class OhMyClient { return runJob(jobId, null, 0); } - /* ************* Instance 区 ************* */ + /* ************* Instance API list ************* */ /** * 停止应用实例 * @param instanceId 应用实例ID @@ -275,7 +275,7 @@ public class OhMyClient { return JSONObject.parseObject(post, INSTANCE_RESULT_TYPE); } - /* ************* Workflow 区 ************* */ + /* ************* Workflow API list ************* */ /** * 保存工作流(包括创建和修改) * @param request 创建/修改 Workflow 请求 @@ -374,7 +374,7 @@ public class OhMyClient { return runWorkflow(workflowId, null, 0); } - /* ************* Workflow Instance 区 ************* */ + /* ************* Workflow Instance API list ************* */ /** * 停止应用实例 * @param wfInstanceId 工作流实例ID diff --git a/powerjob-client/src/main/java/com/github/kfcfans/powerjob/client/TypeStore.java b/powerjob-client/src/main/java/com/github/kfcfans/powerjob/client/TypeStore.java index 754e35ed..0c680e79 100644 --- a/powerjob-client/src/main/java/com/github/kfcfans/powerjob/client/TypeStore.java +++ b/powerjob-client/src/main/java/com/github/kfcfans/powerjob/client/TypeStore.java @@ -4,7 +4,7 @@ import com.alibaba.fastjson.TypeReference; import com.github.kfcfans.powerjob.common.response.*; /** - * 类型工厂 + * TypeReference store. * * @author tjq * @since 11/7/20 diff --git a/powerjob-client/src/test/java/TestClient.java b/powerjob-client/src/test/java/TestClient.java index f50aed98..61fae077 100644 --- a/powerjob-client/src/test/java/TestClient.java +++ b/powerjob-client/src/test/java/TestClient.java @@ -12,7 +12,7 @@ import org.junit.jupiter.api.Test; import java.util.concurrent.TimeUnit; /** - * 测试 Client + * Test cases for {@link OhMyClient} * * @author tjq * @since 2020/4/15 @@ -110,7 +110,7 @@ public class TestClient { ResultDTO startRes = ohMyClient.runJob(15L, "start by OhMyClient", 2000000); System.out.println("runJob result: " + JSONObject.toJSONString(startRes)); - // 手动重启 server,干掉时间轮中的调度数据 + // Restart server manually and clear all the data in time wheeler. TimeUnit.MINUTES.sleep(1); ResultDTO cancelRes = ohMyClient.cancelInstance(startRes.getData()); diff --git a/powerjob-client/src/test/java/TestWorkflow.java b/powerjob-client/src/test/java/TestWorkflow.java index 6feaf266..71630e7e 100644 --- a/powerjob-client/src/test/java/TestWorkflow.java +++ b/powerjob-client/src/test/java/TestWorkflow.java @@ -13,7 +13,7 @@ import org.junit.jupiter.api.Test; import java.util.List; /** - * 测试 Client(workflow部分) + * Test cases for {@link OhMyClient} workflow. * * @author tjq * @since 2020/6/2