You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "xcorpio (GitHub)" <gi...@apache.org> on 2019/01/07 09:40:54 UTC
[GitHub] [incubator-dubbo] xcorpio opened issue #3163: 使用泛化调用中如何使用异步
泛化调用中
```java
public interface GenericService {
Object $invoke(String method, String[] parameterTypes, Object[] args) throws GenericException;
}
```
可不可以异步调用返回个Future
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3163 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] carryxyh commented on issue #3163:
CompletableFuture support for GenericService.
Posted by "carryxyh (GitHub)" <gi...@apache.org>.
Simple pr for this issue:
https://github.com/apache/incubator-dubbo/pull/3637
Would u pls have a review?
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3163 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] chickenlj commented on issue #3163: 使用泛化调用中如何使用异步
Posted by "chickenlj (GitHub)" <gi...@apache.org>.
@carryxyh No hurry, if you don't get enough time maybe I can give it a try. Just make sure we don't spend too much time repeating this issue.
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3163 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] manzhizhen commented on issue #3163: 使用泛化调用中如何使用异步
Posted by "manzhizhen (GitHub)" <gi...@apache.org>.
I was suddenly more curious at the time that the GenericService did not implement asynchronous calls? Haha
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3163 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] chickenlj commented on issue #3163: 使用泛化调用中如何使用异步
Posted by "chickenlj (GitHub)" <gi...@apache.org>.
> public interface GenericService {
>
> Object $invoke(String method, String[] parameterTypes, Object[] args) throws GenericException;
>
> CompletableFuture<Object> $invokeAsync(String method, String[] parameterTypes, Object[] args) throws GenericException;
> }
Is there any progress on this feature?
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3163 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] xcorpio commented on issue #3163: 使用泛化调用中如何使用异步
Posted by "xcorpio (GitHub)" <gi...@apache.org>.
OK,期待...
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3163 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] carryxyh commented on issue #3163: 使用泛化调用中如何使用异步
Posted by "carryxyh (GitHub)" <gi...@apache.org>.
应该是可以的,不过我需要验证一下效果,但是需要改造一下GenericService接口。
可能将来会长这样:
```
public interface GenericService {
Object $invoke(String method, String[] parameterTypes, Object[] args) throws GenericException;
CompletableFuture<Object> $invokeAsync(String method, String[] parameterTypes, Object[] args) throws GenericException;
}
```
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3163 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] carryxyh commented on issue #3163: 使用泛化调用中如何使用异步
Posted by "carryxyh (GitHub)" <gi...@apache.org>.
@chickenlj
Hi, I am very sorry that I have been procrastinating for a long time.
I will try to solve this problem this week. If it's more complicated, I'll discuss a scenario on the mailing list.
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3163 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] xiangxiuhui commented on issue #3163: 使用泛化调用中如何使用异步
Posted by "xiangxiuhui (GitHub)" <gi...@apache.org>.
> 应该是可以的,不过我需要验证一下效果,但是需要改造一下GenericService接口。
> 可能将来会长这样:
>
> ```
> public interface GenericService {
>
> Object $invoke(String method, String[] parameterTypes, Object[] args) throws GenericException;
>
> CompletableFuture<Object> $invokeAsync(String method, String[] parameterTypes, Object[] args) throws GenericException;
> }
> ```
oninvoke、onreturn、onthrow 也要支持下 GenericService
例如下面判断:
final Method onInvokeMethod = (Method) StaticContext.getSystemContext().get(StaticContext.getKey(invoker.getUrl(), invocation.getMethodName(), Constants.ON_INVOKE_METHOD_KEY));
final Object onInvokeInst = StaticContext.getSystemContext().get(StaticContext.getKey(invoker.getUrl(), invocation.getMethodName(), Constants.ON_INVOKE_INSTANCE_KEY));
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3163 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] chickenlj commented on issue #3163:
CompletableFuture support for GenericService.
Posted by "chickenlj (GitHub)" <gi...@apache.org>.
I am on it.
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3163 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org