Class IgnoreExtraResponsesValidityFilter
- java.lang.Object
-
- org.infinispan.remoting.responses.IgnoreExtraResponsesValidityFilter
-
- All Implemented Interfaces:
ResponseFilter
public final class IgnoreExtraResponsesValidityFilter extends java.lang.Object implements ResponseFilter
A filter that only expects responses from an initial set of targets. Useful when sending a command tonullto ensure we don't wait for responses from cluster members that weren't properly started when the command was sent. JGroups calls our handler while holding a lock, so we don't need any synchronization.- Since:
- 5.1
- Author:
- Dan Berindei <dan@infinispan.org>
-
-
Constructor Summary
Constructors Constructor Description IgnoreExtraResponsesValidityFilter(java.util.Collection<Address> targets, Address self, boolean removeSelf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAcceptable(Response response, Address address)Determines whether a response from a given sender should be added to the response list of the requestbooleanneedMoreResponses()Right after callingResponseFilter.isAcceptable(Response, Address), this method is called to see whether we are done with the request and can unblock the caller
-
-
-
Method Detail
-
isAcceptable
public boolean isAcceptable(Response response, Address address)
Description copied from interface:ResponseFilterDetermines whether a response from a given sender should be added to the response list of the request- Specified by:
isAcceptablein interfaceResponseFilter- Parameters:
response- The response (usually a serializable value)address- The sender of response- Returns:
- True if we should add the response to the response list of a request, otherwise false. In the latter case, we don't add the response to the response list.
-
needMoreResponses
public boolean needMoreResponses()
Description copied from interface:ResponseFilterRight after callingResponseFilter.isAcceptable(Response, Address), this method is called to see whether we are done with the request and can unblock the caller- Specified by:
needMoreResponsesin interfaceResponseFilter- Returns:
- False if the request is done, otherwise true
-
-