|Modifier and Type||Field and Description|
|Modifier and Type||Method and Description|
Called when a response is received, or when a target node becomes unavailable.
public static final PassthroughSingleResponseCollector INSTANCE
When a target node leaves the cluster, this method is called with a
Should return a non-
null result if the request should complete with that value, or
if it should wait for more responses.
If the method throws an exception, the request will be completed with that exception.
If the last response is received and
addResponse() still returns
ResponseCollector.finish() will also be called to obtain a result.
addResponse() will *not* be called concurrently from multiple threads,
and the request will not be completed while
addResponse() is running.
public Response finish()
nullfor the last response.
finish() finishes normally, the request will complete with its return value
finish() throws an exception, the request will complete exceptionally with that exception,
wrapped in a
CompletionException (unless the exception is already a
Copyright © 2021 JBoss by Red Hat. All rights reserved.