public interface ResponseFilter
needMoreResponses() method could return false allowing the call to return without waiting
for other slower-to-arrive responses.
Based on JGroups' RspFilter concept, but with a separate abstraction. The abstraction has be done to avoid leaking JGroups
classes to ha-server-api consumers and to avoid adding an absolute dependency on JGroups to HAPartition implementations.HAPartition#callMethodOnCluster(String, String, Object[], Class[], boolean, ResponseFilter)| Modifier and Type | Method and Description |
|---|---|
boolean |
isAcceptable(Object response,
ClusterNode sender)
Determines whether a response from a given sender should be added to the response list of the request
|
boolean |
needMoreResponses()
Right after a call to
isAcceptable(Object, ClusterNode), this method is called to see whether we are done with
the request and can unblock the caller. |
boolean isAcceptable(Object response, ClusterNode sender)
response - The response (usually a serializable value)sender - The sender of responsetrue if we should add the response to the response list of returned by
HAPartition#callMethodOnCluster(String, String, Object[], Class[], boolean, ResponseFilter) otherwise
false. In the latter case, the response will not be included in the list returned to the RPC caller.boolean needMoreResponses()
isAcceptable(Object, ClusterNode), this method is called to see whether we are done with
the request and can unblock the caller.true if the request is done, otherwise falsealseCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.