fix typo in CommonConstants (#6373)
This commit is contained in:
parent
bbacab0b32
commit
41cbb23473
|
|
@ -112,7 +112,7 @@ public interface CommonConstants {
|
|||
|
||||
// used by invocation attachments to transfer timeout from Consumer to Provider.
|
||||
// works as a replacement of TIMEOUT_KEY on wire, which seems to be totally useless in previous releases).
|
||||
String TIMEOUT_ATTACHENT_KEY = "_TO";
|
||||
String TIMEOUT_ATTACHMENT_KEY = "_TO";
|
||||
|
||||
String TIME_COUNTDOWN_KEY = "timeout-countdown";
|
||||
|
||||
|
|
@ -120,13 +120,13 @@ public interface CommonConstants {
|
|||
|
||||
String REMOVE_VALUE_PREFIX = "-";
|
||||
|
||||
String PROPERTIES_CHAR_SEPERATOR = "-";
|
||||
String PROPERTIES_CHAR_SEPARATOR = "-";
|
||||
|
||||
String UNDERLINE_SEPARATOR = "_";
|
||||
|
||||
String SEPARATOR_REGEX = "_|-";
|
||||
|
||||
String GROUP_CHAR_SEPERATOR = ":";
|
||||
String GROUP_CHAR_SEPARATOR = ":";
|
||||
|
||||
String HIDE_KEY_PREFIX = ".";
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.DUBBO;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.PROPERTIES_CHAR_SEPERATOR;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.PROPERTIES_CHAR_SEPARATOR;
|
||||
|
||||
/**
|
||||
* MetadataReportConfig
|
||||
|
|
@ -38,7 +38,7 @@ public class MetadataReportConfig extends AbstractConfig {
|
|||
* the value is : metadata-report
|
||||
*/
|
||||
private static final String PREFIX_TAG = StringUtils.camelToSplitName(
|
||||
MetadataReportConfig.class.getSimpleName().substring(0, MetadataReportConfig.class.getSimpleName().length() - 6), PROPERTIES_CHAR_SEPERATOR);
|
||||
MetadataReportConfig.class.getSimpleName().substring(0, MetadataReportConfig.class.getSimpleName().length() - 6), PROPERTIES_CHAR_SEPARATOR);
|
||||
|
||||
// Register center address
|
||||
private String address;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import static org.apache.dubbo.common.constants.CommonConstants.INTERFACE_KEY;
|
|||
import static org.apache.dubbo.common.constants.CommonConstants.PATH_KEY;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.PROVIDER;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.REMOTE_APPLICATION_KEY;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_ATTACHENT_KEY;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_ATTACHMENT_KEY;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_KEY;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.TIME_COUNTDOWN_KEY;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.VERSION_KEY;
|
||||
|
|
@ -71,7 +71,7 @@ public class ContextFilter implements Filter, Filter.Listener {
|
|||
UNLOADING_KEYS.add(DUBBO_VERSION_KEY);
|
||||
UNLOADING_KEYS.add(TOKEN_KEY);
|
||||
UNLOADING_KEYS.add(TIMEOUT_KEY);
|
||||
UNLOADING_KEYS.add(TIMEOUT_ATTACHENT_KEY);
|
||||
UNLOADING_KEYS.add(TIMEOUT_ATTACHMENT_KEY);
|
||||
|
||||
// Remove async property to avoid being passed to the following invoke chain.
|
||||
UNLOADING_KEYS.add(ASYNC_KEY);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import java.util.concurrent.atomic.AtomicLong;
|
|||
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.$INVOKE;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.$INVOKE_ASYNC;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_ATTACHENT_KEY;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_ATTACHMENT_KEY;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_KEY;
|
||||
import static org.apache.dubbo.rpc.Constants.$ECHO;
|
||||
import static org.apache.dubbo.rpc.Constants.ASYNC_KEY;
|
||||
|
|
@ -217,7 +217,7 @@ public class RpcUtils {
|
|||
|
||||
public static long getTimeout(Invocation invocation, long defaultTimeout) {
|
||||
long timeout = defaultTimeout;
|
||||
Object genericTimeout = invocation.getObjectAttachment(TIMEOUT_ATTACHENT_KEY);
|
||||
Object genericTimeout = invocation.getObjectAttachment(TIMEOUT_ATTACHMENT_KEY);
|
||||
if (genericTimeout != null) {
|
||||
timeout = convertToNumber(genericTimeout, defaultTimeout);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ import static org.apache.dubbo.common.constants.CommonConstants.ENABLE_TIMEOUT_C
|
|||
import static org.apache.dubbo.common.constants.CommonConstants.GROUP_KEY;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.INTERFACE_KEY;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.PATH_KEY;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_ATTACHENT_KEY;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_ATTACHMENT_KEY;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.TIME_COUNTDOWN_KEY;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.VERSION_KEY;
|
||||
import static org.apache.dubbo.rpc.Constants.TOKEN_KEY;
|
||||
|
|
@ -168,12 +168,12 @@ public class DubboInvoker<T> extends AbstractInvoker<T> {
|
|||
if (countdown == null) {
|
||||
timeout = (int) RpcUtils.getTimeout(getUrl(), methodName, RpcContext.getContext(), DEFAULT_TIMEOUT);
|
||||
if (getUrl().getParameter(ENABLE_TIMEOUT_COUNTDOWN_KEY, false)) {
|
||||
invocation.setObjectAttachment(TIMEOUT_ATTACHENT_KEY, timeout); // pass timeout to remote server
|
||||
invocation.setObjectAttachment(TIMEOUT_ATTACHMENT_KEY, timeout); // pass timeout to remote server
|
||||
}
|
||||
} else {
|
||||
TimeoutCountDown timeoutCountDown = (TimeoutCountDown) countdown;
|
||||
timeout = (int) timeoutCountDown.timeRemaining(TimeUnit.MILLISECONDS);
|
||||
invocation.setObjectAttachment(TIMEOUT_ATTACHENT_KEY, timeout);// pass timeout to remote server
|
||||
invocation.setObjectAttachment(TIMEOUT_ATTACHMENT_KEY, timeout);// pass timeout to remote server
|
||||
}
|
||||
return timeout;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue