public class FilterMapResponseCollector extends ValidResponseCollector<Map<Address,Response>>
JGroupsTransport.invokeRemotelyAsync(Collection, ReplicableCommand, ResponseMode, long, ResponseFilter, DeliverOrder, boolean).
This class is not thread-safe by itself. It expects an AbstractRequest
to handle synchronization.
| Constructor and Description |
|---|
FilterMapResponseCollector(ResponseFilter filter,
boolean waitForAll,
int expectedSize) |
| Modifier and Type | Method and 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 after
ResponseCollector.addResponse(Address, Response) returns null for the last response. |
addResponsepublic FilterMapResponseCollector(ResponseFilter filter, boolean waitForAll, int expectedSize)
protected Map<Address,Response> addValidResponse(Address sender, ValidResponse response)
ValidResponseCollectoraddValidResponse in class ValidResponseCollector<Map<Address,Response>>null to continue waiting for response, non-null to complete with that value.protected Map<Address,Response> addTargetNotFound(Address sender)
ValidResponseCollectoraddTargetNotFound in class ValidResponseCollector<Map<Address,Response>>null to continue waiting for response, non-null to complete with that value.protected Map<Address,Response> addException(Address sender, Exception exception)
ValidResponseCollectoraddException in class ValidResponseCollector<Map<Address,Response>>null to continue waiting for responses (the default), non-null to complete with that
value.public Map<Address,Response> finish()
ResponseCollectorResponseCollector.addResponse(Address, Response) returns null for the last response.
If finish() finishes normally, the request will complete with its return value
(even if null).
If finish() throws an exception, the request will complete exceptionally with that exception,
wrapped in a CompletionException (unless the exception is already a
CompletionException).
finish in interface ResponseCollector<Map<Address,Response>>finish in class ValidResponseCollector<Map<Address,Response>>Copyright © 2021 JBoss by Red Hat. All rights reserved.