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

I18N effort, translate the missing content

上级 b04e83e2
...@@ -561,7 +561,7 @@ public class RpcContext { ...@@ -561,7 +561,7 @@ public class RpcContext {
try { try {
setAttachment(Constants.ASYNC_KEY, Boolean.TRUE.toString()); setAttachment(Constants.ASYNC_KEY, Boolean.TRUE.toString());
final T o = callable.call(); final T o = callable.call();
//local调用会直接返回结果. //local invoke will return directly
if (o != null) { if (o != null) {
FutureTask<T> f = new FutureTask<T>(new Callable<T>() { FutureTask<T> f = new FutureTask<T>(new Callable<T>() {
public T call() throws Exception { public T call() throws Exception {
......
...@@ -48,8 +48,7 @@ public class RpcStatus { ...@@ -48,8 +48,7 @@ public class RpcStatus {
private final AtomicLong succeededMaxElapsed = new AtomicLong(); private final AtomicLong succeededMaxElapsed = new AtomicLong();
/** /**
* 用来实现executes属性的并发限制(即控制能使用的线程数) * Semaphore used to control concurrency limit set by `executes`
* 2017-08-21 yizhenqiang
*/ */
private volatile Semaphore executesLimit; private volatile Semaphore executesLimit;
private volatile int executesPermits; private volatile int executesPermits;
......
...@@ -45,7 +45,7 @@ public class ContextFilter implements Filter { ...@@ -45,7 +45,7 @@ public class ContextFilter implements Filter {
attachments.remove(Constants.DUBBO_VERSION_KEY); attachments.remove(Constants.DUBBO_VERSION_KEY);
attachments.remove(Constants.TOKEN_KEY); attachments.remove(Constants.TOKEN_KEY);
attachments.remove(Constants.TIMEOUT_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() RpcContext.getContext()
.setInvoker(invoker) .setInvoker(invoker)
......
...@@ -48,8 +48,8 @@ public class ProtocolUtils { ...@@ -48,8 +48,8 @@ public class ProtocolUtils {
public static boolean isGeneric(String generic) { public static boolean isGeneric(String generic) {
return generic != null return generic != null
&& !"".equals(generic) && !"".equals(generic)
&& (Constants.GENERIC_SERIALIZATION_DEFAULT.equalsIgnoreCase(generic) /* 正常的泛化调用 */ && (Constants.GENERIC_SERIALIZATION_DEFAULT.equalsIgnoreCase(generic) /* Normal generalization cal */
|| Constants.GENERIC_SERIALIZATION_NATIVE_JAVA.equalsIgnoreCase(generic) /* 支持java序列化的流式泛化调用 */ || Constants.GENERIC_SERIALIZATION_NATIVE_JAVA.equalsIgnoreCase(generic) /* Streaming generalization call supporting jdk serialization */
|| Constants.GENERIC_SERIALIZATION_BEAN.equalsIgnoreCase(generic)); || Constants.GENERIC_SERIALIZATION_BEAN.equalsIgnoreCase(generic));
} }
......
...@@ -35,7 +35,7 @@ public class AccessLogFilterTest { ...@@ -35,7 +35,7 @@ public class AccessLogFilterTest {
Filter accessLogFilter = new AccessLogFilter(); Filter accessLogFilter = new AccessLogFilter();
// 测试filter不会抛出异常 // Test filter won't throw an exception
@Test @Test
public void testInvokeException() { public void testInvokeException() {
Invoker<AccessLogFilterTest> invoker = new MyInvoker<AccessLogFilterTest>(null); Invoker<AccessLogFilterTest> invoker = new MyInvoker<AccessLogFilterTest>(null);
......
...@@ -43,7 +43,7 @@ public class ExplicitCallbackTest { ...@@ -43,7 +43,7 @@ public class ExplicitCallbackTest {
protected Invoker<IDemoService> reference = null; protected Invoker<IDemoService> reference = null;
protected URL serviceURL = null; protected URL serviceURL = null;
protected URL consumerUrl = null; protected URL consumerUrl = null;
// ============================华丽的分割线================================================ // ============================A gorgeous line of segmentation================================================
IDemoService demoProxy = null; IDemoService demoProxy = null;
@After @After
......
...@@ -91,7 +91,7 @@ public class InjvmProtocol extends AbstractProtocol implements Protocol { ...@@ -91,7 +91,7 @@ public class InjvmProtocol extends AbstractProtocol implements Protocol {
public boolean isInjvmRefer(URL url) { public boolean isInjvmRefer(URL url) {
final boolean isJvmRefer; final boolean isJvmRefer;
String scope = url.getParameter(Constants.SCOPE_KEY); 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())) { if (Constants.LOCAL_PROTOCOL.toString().equals(url.getProtocol())) {
isJvmRefer = false; isJvmRefer = false;
} else if (Constants.SCOPE_LOCAL.equals(scope) || (url.getParameter("injvm", false))) { } else if (Constants.SCOPE_LOCAL.equals(scope) || (url.getParameter("injvm", false))) {
......
/** /*
* File Created at 2011-12-09 * Licensed to the Apache Software Foundation (ASF) under one or more
* $Id$ * contributor license agreements. See the NOTICE file distributed with
* <p> * this work for additional information regarding copyright ownership.
* Copyright 2008 Alibaba.com Croporation Limited. * The ASF licenses this file to You under the Apache License, Version 2.0
* All rights reserved. * (the "License"); you may not use this file except in compliance with
* <p> * the License. You may obtain a copy of the License at
* This software is the confidential and proprietary information of *
* Alibaba Company. ("Confidential Information"). You shall not * http://www.apache.org/licenses/LICENSE-2.0
* disclose such Confidential Information and shall use it only in *
* accordance with the terms of the license agreement you entered into * Unless required by applicable law or agreed to in writing, software
* with Alibaba.com. * 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; package com.alibaba.dubbo.rpc.protocol.thrift;
...@@ -23,7 +26,6 @@ import org.junit.Assert; ...@@ -23,7 +26,6 @@ import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
/** /**
* @author <a href="mailto:gang.lvg@alibaba-inc.com">kimi</a>
*/ */
public class ServerExceptionTest extends AbstractTest { public class ServerExceptionTest extends AbstractTest {
...@@ -63,6 +65,7 @@ public class ServerExceptionTest extends AbstractTest { ...@@ -63,6 +65,7 @@ public class ServerExceptionTest extends AbstractTest {
public String echoString(String arg) { public String echoString(String arg) {
// 在 server 端,thrift 无法处理 idl 中没有声明的异常 // 在 server 端,thrift 无法处理 idl 中没有声明的异常
// On server side, thrift can not handle exceptions not declared in idl
throw new RuntimeException("just for test"); throw new RuntimeException("just for test");
} }
}; };
......
...@@ -56,7 +56,7 @@ public abstract class AbstractBenchmarkServer { ...@@ -56,7 +56,7 @@ public abstract class AbstractBenchmarkServer {
Exchangers.bind(url.toString(), new ExchangeHandlerAdapter() { Exchangers.bind(url.toString(), new ExchangeHandlerAdapter() {
public Object reply(ExchangeChannel channel, Object message) throws RemotingException { 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.
先完成此消息的编辑!
想要评论请 注册