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