Class MapResponseCollector
- java.lang.Object
-
- org.infinispan.remoting.transport.ValidResponseCollector<Map<Address,Response>>
-
- org.infinispan.remoting.transport.impl.MapResponseCollector
-
- All Implemented Interfaces:
ResponseCollector<Map<Address,Response>>
public abstract class MapResponseCollector extends ValidResponseCollector<Map<Address,Response>>
Response collector supportingJGroupsTransport.invokeRemotelyAsync(Collection, ReplicableCommand, ResponseMode, long, ResponseFilter, DeliverOrder, boolean)
.- Since:
- 9.2
- Author:
- Dan Berindei
-
-
Method Summary
All Methods Static 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>
addValidResponse(Address sender, ValidResponse response)
Process a valid response from a target.Map<Address,Response>
finish()
Called afterResponseCollector.addResponse(Address, Response)
returnsnull
for the last response.static MapResponseCollector
ignoreLeavers()
static MapResponseCollector
ignoreLeavers(boolean ignoreLeavers)
static MapResponseCollector
ignoreLeavers(boolean ignoreLeavers, int expectedSize)
static MapResponseCollector
ignoreLeavers(int expectedSize)
static MapResponseCollector
validOnly()
static MapResponseCollector
validOnly(int expectedSize)
-
Methods inherited from class org.infinispan.remoting.transport.ValidResponseCollector
addResponse, addTargetNotFound
-
-
-
-
Method Detail
-
validOnly
public static MapResponseCollector validOnly(int expectedSize)
-
validOnly
public static MapResponseCollector validOnly()
-
ignoreLeavers
public static MapResponseCollector ignoreLeavers(int expectedSize)
-
ignoreLeavers
public static MapResponseCollector ignoreLeavers()
-
ignoreLeavers
public static MapResponseCollector ignoreLeavers(boolean ignoreLeavers, int expectedSize)
-
ignoreLeavers
public static MapResponseCollector ignoreLeavers(boolean ignoreLeavers)
-
addException
protected Map<Address,Response> addException(Address sender, Exception exception)
Description copied from class:ValidResponseCollector
Process an exception from a target.- Specified by:
addException
in classValidResponseCollector<Map<Address,Response>>
- Returns:
null
to continue waiting for responses (the default), non-null
to complete with that value.
-
addValidResponse
protected Map<Address,Response> addValidResponse(Address sender, ValidResponse response)
Description copied from class:ValidResponseCollector
Process a valid response from a target.- Specified by:
addValidResponse
in classValidResponseCollector<Map<Address,Response>>
- Returns:
null
to continue waiting for response, non-null
to complete with that value.
-
finish
public Map<Address,Response> finish()
Description copied from interface:ResponseCollector
Called afterResponseCollector.addResponse(Address, Response)
returnsnull
for 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:
finish
in interfaceResponseCollector<Map<Address,Response>>
- Specified by:
finish
in classValidResponseCollector<Map<Address,Response>>
-
-