[jboss-jira] [JBoss JIRA] Commented: (JGRP-971) RpcDispatcher/MessageDispatcher: additional methods which return a Future rather than blocking

Bela Ban (JIRA) jira-events at lists.jboss.org
Thu Apr 30 03:57:46 EDT 2009


    [ https://jira.jboss.org/jira/browse/JGRP-971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12465153#action_12465153 ] 

Bela Ban commented on JGRP-971:
-------------------------------

Waiting on multiple futures should probably better use the fork-join framework available in JDK 7

> RpcDispatcher/MessageDispatcher: additional methods which return a Future rather than blocking
> ----------------------------------------------------------------------------------------------
>
>                 Key: JGRP-971
>                 URL: https://jira.jboss.org/jira/browse/JGRP-971
>             Project: JGroups
>          Issue Type: Feature Request
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>             Fix For: 2.8
>
>
> Currently, synchronous (cluster-wide) calls in RpcDispatcher and MessageDispatcher block until all (or a portion) of the responses have been received.
> Goal: to provide additional methods for callRemoteMethods() and castMessage() which return a Future<RspList>. This allows a user to dispatch multiple blocking calls and fetch the result later, e.g. (pseudo code):
> Future<RspList> r1, r2;
> r1=dispatcher.callRemoteMethods(null, "foo", new Object[]{10}, new Class[](int.class}, GroupRequest.GET_ALL, 5000);
> r2=dispatcher.callRemoteMethods(null, "bar", new Object[]{10}, new Class[](int.class}, GroupRequest.GET_ALL, 5000);
> // do something
> if(r1.isDone()) {
>    RspList rsp_1=r1.getResult();
> }
> This should be combined with a notification mechanism (RspFilter) so a users gets notified (if desired) of each response, and also when the result is complete

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list