zrlw opened a new issue #9574:
URL: https://github.com/apache/dubbo/issues/9574
比如master分支下列调用使用的key都没有再Method里定义。
1. AbstractLoadBalance的WEIGHT_KEY:
```
weight = url.getMethodParameter(invocation.getMethodName(),
WEIGHT_KEY, DEFAULT_WEIGHT);
```
2. ConsistentHashLoadBalance的HASH_NODES和HASH_ARGUMENTS:
```
this.replicaNumber = url.getMethodParameter(methodName,
HASH_NODES, 160);
String[] index =
COMMA_SPLIT_PATTERN.split(url.getMethodParameter(methodName, HASH_ARGUMENTS,
"0"));
```
3. MockClusterInvoker的MOCK_KEY:
```
String value =
getUrl().getMethodParameter(invocation.getMethodName(), MOCK_KEY,
Boolean.FALSE.toString()).trim();
```
4. JCache的"cache.write.expire":
```
MutableConfiguration config =
new MutableConfiguration<>()
.setTypes(Object.class, Object.class)
.setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(new
Duration(TimeUnit.MILLISECONDS, url.getMethodParameter(method,
"cache.write.expire", 60 * 1000))))
.setStoreByValue(false)
.setManagementEnabled(true)
.setStatisticsEnabled(true);
```
5. RpcUtils的AUTO_ATTACH_INVOCATIONID_KEY和RETURN_KEY:
```
String value = url.getMethodParameter(invocation.getMethodName(),
AUTO_ATTACH_INVOCATIONID_KEY);
...
isOneway = !url.getMethodParameter(getMethodName(inv),
RETURN_KEY, true);
```
这些key无法通过Method注解的方式进行配置,那么上述这些代码要怎么用?
比如第一个AbstractLoadBalance的这个WEIGHT_KEY,看起来是从URL获取method的权重,应用要怎么设置才能执行到这一行代码呢?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]