Skip to content

Commit

Permalink
I18N effort, translate the missing content
Browse files Browse the repository at this point in the history
  • Loading branch information
chickenlj committed Dec 27, 2017
1 parent b04e83e commit 8cc0695
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ public <T> Future<T> asyncCall(Callable<T> callable) {
try {
setAttachment(Constants.ASYNC_KEY, Boolean.TRUE.toString());
final T o = callable.call();
//local调用会直接返回结果.
//local invoke will return directly
if (o != null) {
FutureTask<T> f = new FutureTask<T>(new Callable<T>() {
public T call() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ public class RpcStatus {
private final AtomicLong succeededMaxElapsed = new AtomicLong();

/**
* 用来实现executes属性的并发限制(即控制能使用的线程数)
* 2017-08-21 yizhenqiang
* Semaphore used to control concurrency limit set by `executes`
*/
private volatile Semaphore executesLimit;
private volatile int executesPermits;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcExcept
attachments.remove(Constants.DUBBO_VERSION_KEY);
attachments.remove(Constants.TOKEN_KEY);
attachments.remove(Constants.TIMEOUT_KEY);
attachments.remove(Constants.ASYNC_KEY);//清空消费端的异步参数
attachments.remove(Constants.ASYNC_KEY);// Remove async property to avoid being passed to the following invoke chain.
}
RpcContext.getContext()
.setInvoker(invoker)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public static String serviceKey(int port, String serviceName, String serviceVers
public static boolean isGeneric(String generic) {
return generic != null
&& !"".equals(generic)
&& (Constants.GENERIC_SERIALIZATION_DEFAULT.equalsIgnoreCase(generic) /* 正常的泛化调用 */
|| Constants.GENERIC_SERIALIZATION_NATIVE_JAVA.equalsIgnoreCase(generic) /* 支持java序列化的流式泛化调用 */
&& (Constants.GENERIC_SERIALIZATION_DEFAULT.equalsIgnoreCase(generic) /* Normal generalization cal */
|| Constants.GENERIC_SERIALIZATION_NATIVE_JAVA.equalsIgnoreCase(generic) /* Streaming generalization call supporting jdk serialization */
|| Constants.GENERIC_SERIALIZATION_BEAN.equalsIgnoreCase(generic));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class AccessLogFilterTest {

Filter accessLogFilter = new AccessLogFilter();

// 测试filter不会抛出异常
// Test filter won't throw an exception
@Test
public void testInvokeException() {
Invoker<AccessLogFilterTest> invoker = new MyInvoker<AccessLogFilterTest>(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class ExplicitCallbackTest {
protected Invoker<IDemoService> reference = null;
protected URL serviceURL = null;
protected URL consumerUrl = null;
// ============================华丽的分割线================================================
// ============================A gorgeous line of segmentation================================================
IDemoService demoProxy = null;

@After
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public <T> Invoker<T> refer(Class<T> serviceType, URL url) throws RpcException {
public boolean isInjvmRefer(URL url) {
final boolean isJvmRefer;
String scope = url.getParameter(Constants.SCOPE_KEY);
//本身已经是jvm协议了,走正常流程就是了.
// Since injvm protocol is configured explicitly, we don't need to set any extra flag, use normal refer process.
if (Constants.LOCAL_PROTOCOL.toString().equals(url.getProtocol())) {
isJvmRefer = false;
} else if (Constants.SCOPE_LOCAL.equals(scope) || (url.getParameter("injvm", false))) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
/**
* File Created at 2011-12-09
* $Id$
* <p>
* Copyright 2008 Alibaba.com Croporation Limited.
* All rights reserved.
* <p>
* This software is the confidential and proprietary information of
* Alibaba Company. ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with Alibaba.com.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.rpc.protocol.thrift;

Expand All @@ -23,7 +26,6 @@
import org.junit.Test;

/**
* @author <a href="mailto:[email protected]">kimi</a>
*/
public class ServerExceptionTest extends AbstractTest {

Expand Down Expand Up @@ -63,6 +65,7 @@ public double echoDouble(double arg) {

public String echoString(String arg) {
// 在 server 端,thrift 无法处理 idl 中没有声明的异常
// On server side, thrift can not handle exceptions not declared in idl
throw new RuntimeException("just for test");
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void run(String[] args) throws Exception {
Exchangers.bind(url.toString(), new ExchangeHandlerAdapter() {

public Object reply(ExchangeChannel channel, Object message) throws RemotingException {
return new ResponseObject(responseSize); // 发送响应
return new ResponseObject(responseSize); // send response
}
});
}
Expand Down

0 comments on commit 8cc0695

Please sign in to comment.