Class FilterMapResponseCollector
- java.lang.Object
-
- org.infinispan.remoting.transport.ValidResponseCollector<Map<Address,Response>>
-
- org.infinispan.remoting.transport.impl.FilterMapResponseCollector
-
- All Implemented Interfaces:
ResponseCollector<Map<Address,Response>>
public class FilterMapResponseCollector extends ValidResponseCollector<Map<Address,Response>>
Response collector supportingJGroupsTransport.invokeRemotelyAsync(Collection, ReplicableCommand, ResponseMode, long, ResponseFilter, DeliverOrder, boolean).This class is not thread-safe by itself. It expects an
AbstractRequestto handle synchronization.
-
-
Constructor Summary
Constructors Constructor Description FilterMapResponseCollector(ResponseFilter filter, boolean waitForAll, int expectedSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<Address,Response>addException(Address sender, Exception exception)Process an exception from a target.protected Map<Address,Response>addTargetNotFound(Address sender)Process a target leaving the cluster or stopping the cache.protected Map<Address,Response>addValidResponse(Address sender, ValidResponse response)Process a valid response from a target.Map<Address,Response>finish()Called afterResponseCollector.addResponse(Address, Response)returnsnullfor the last response.-
Methods inherited from class org.infinispan.remoting.transport.ValidResponseCollector
addResponse
-
-
-
-
Constructor Detail
-
FilterMapResponseCollector
public FilterMapResponseCollector(ResponseFilter filter, boolean waitForAll, int expectedSize)
-
-
Method Detail
-
addValidResponse
protected Map<Address,Response> addValidResponse(Address sender, ValidResponse response)
Description copied from class:ValidResponseCollectorProcess a valid response from a target.- Specified by:
addValidResponsein classValidResponseCollector<Map<Address,Response>>- Returns:
nullto continue waiting for response, non-nullto complete with that value.
-
addTargetNotFound
protected Map<Address,Response> addTargetNotFound(Address sender)
Description copied from class:ValidResponseCollectorProcess a target leaving the cluster or stopping the cache.- Specified by:
addTargetNotFoundin classValidResponseCollector<Map<Address,Response>>- Returns:
nullto continue waiting for response, non-nullto complete with that value.
-
addException
protected Map<Address,Response> addException(Address sender, Exception exception)
Description copied from class:ValidResponseCollectorProcess an exception from a target.- Specified by:
addExceptionin classValidResponseCollector<Map<Address,Response>>- Returns:
nullto continue waiting for responses (the default), non-nullto complete with that value.
-
finish
public Map<Address,Response> finish()
Description copied from interface:ResponseCollectorCalled afterResponseCollector.addResponse(Address, Response)returnsnullfor the last response.If
finish()finishes normally, the request will complete with its return value (even ifnull). Iffinish()throws an exception, the request will complete exceptionally with that exception, wrapped in aCompletionException(unless the exception is already aCompletionException).- Specified by:
finishin interfaceResponseCollector<Map<Address,Response>>- Specified by:
finishin classValidResponseCollector<Map<Address,Response>>
-
-