提交 8cc0695d 编写于 作者: K ken.lj

I18N effort, translate the missing content

上级 b04e83e2
......@@ -561,7 +561,7 @@ public class RpcContext {
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 {
......
......@@ -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;
......
......@@ -45,7 +45,7 @@ public class ContextFilter implements Filter {
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)
......
......@@ -48,8 +48,8 @@ public class ProtocolUtils {
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));
}
......
......@@ -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);
......
......@@ -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
......
......@@ -91,7 +91,7 @@ public class InjvmProtocol extends AbstractProtocol implements Protocol {
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))) {
......
/**
* 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;
......@@ -23,7 +26,6 @@ import org.junit.Assert;
import org.junit.Test;
/**
* @author <a href="mailto:gang.lvg@alibaba-inc.com">kimi</a>
*/
public class ServerExceptionTest extends AbstractTest {
......@@ -63,6 +65,7 @@ public class ServerExceptionTest extends AbstractTest {
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");
}
};
......
......@@ -56,7 +56,7 @@ public abstract class AbstractBenchmarkServer {
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
}
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册