Interface RspFilter


public interface RspFilter
Interface defining when a group request is done. This allows for termination of a group request based on logic implemented by the caller. Example: caller uses mode GET_FIRST plus a RspFilter implementation. Here, the request will not return (assuming timeout is 0) when the first response has been received, but when the filter passed
Version:
$Id: RspFilter.java,v 1.1.2.1 2008/11/25 10:06:21 belaban Exp $
Author:
Bela Ban
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isAcceptable(Object response, Address sender)
    Determines whether a response from a given sender should be added to the response list of the request
    boolean
    Right after calling isAcceptable(Object, org.jgroups.Address), this method is called to see whether we are done with the request and can unblock the caller
  • Method Details

    • isAcceptable

      boolean isAcceptable(Object response, Address sender)
      Determines whether a response from a given sender should be added to the response list of the request
      Parameters:
      response - The response (usually a serializable value)
      sender - The sender of response
      Returns:
      True if we should add the response to the response list (RspList) of a request, otherwise false. In the latter case, we don't add the response to the response list.
    • needMoreResponses

      boolean needMoreResponses()
      Right after calling isAcceptable(Object, org.jgroups.Address), this method is called to see whether we are done with the request and can unblock the caller
      Returns:
      False if the request is done, otherwise true