org.infinispan.remoting.responses
Class SelfDeliverFilter

java.lang.Object
  extended by org.infinispan.remoting.responses.SelfDeliverFilter
All Implemented Interfaces:
ResponseFilter

public class SelfDeliverFilter
extends Object
implements ResponseFilter

Used in Total Order based protocol.

This filter awaits until the command is deliver and processed by the local node.

Warning: Non-Total Order command are not self delivered

Since:
5.3
Author:
Pedro Ruivo

Constructor Summary
SelfDeliverFilter(Address localAddress)
           
 
Method Summary
 boolean isAcceptable(Response response, Address sender)
          Determines whether a response from a given sender should be added to the response list of the request
 boolean needMoreResponses()
          Right after calling ResponseFilter.isAcceptable(Response, Address), this method is called to see whether we are done with the request and can unblock the caller
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelfDeliverFilter

public SelfDeliverFilter(Address localAddress)
Method Detail

isAcceptable

public boolean isAcceptable(Response response,
                            Address sender)
Description copied from interface: ResponseFilter
Determines whether a response from a given sender should be added to the response list of the request

Specified by:
isAcceptable in interface ResponseFilter
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 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: ResponseFilter
Right after calling ResponseFilter.isAcceptable(Response, Address), this method is called to see whether we are done with the request and can unblock the caller

Specified by:
needMoreResponses in interface ResponseFilter
Returns:
False if the request is done, otherwise true

-->

Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.