public class VoidResponseCollector extends ValidResponseCollector<Void>
null.
Throws an exception if it receives at least one exception response, or if
a node is suspected and ignoreLeavers == true.
| Modifier and Type | Method and Description |
|---|---|
protected Void |
addException(Address sender,
Exception exception)
Process an exception from a target.
|
protected Void |
addTargetNotFound(Address sender)
Process a target leaving the cluster or stopping the cache.
|
protected Void |
addValidResponse(Address sender,
ValidResponse response)
Process a valid response from a target.
|
Void |
finish()
Called after
ResponseCollector.addResponse(Address, Response) returns null for the last response. |
static VoidResponseCollector |
ignoreLeavers() |
static VoidResponseCollector |
validOnly() |
addResponsepublic static VoidResponseCollector validOnly()
public static VoidResponseCollector ignoreLeavers()
protected Void addTargetNotFound(Address sender)
ValidResponseCollectoraddTargetNotFound in class ValidResponseCollector<Void>null to continue waiting for response, non-null to complete with that value.protected Void addException(Address sender, Exception exception)
ValidResponseCollectoraddException in class ValidResponseCollector<Void>null to continue waiting for responses (the default), non-null to complete with that
value.protected Void addValidResponse(Address sender, ValidResponse response)
ValidResponseCollectoraddValidResponse in class ValidResponseCollector<Void>null to continue waiting for response, non-null to complete with that value.public Void 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<Void>finish in class ValidResponseCollector<Void>Copyright © 2022 JBoss by Red Hat. All rights reserved.