Class VoidResponseCollector
java.lang.Object
org.infinispan.remoting.transport.ValidResponseCollector<Void>
org.infinispan.remoting.transport.impl.VoidResponseCollector
- All Implemented Interfaces:
ResponseCollector<Void>
Response collector that discards successful responses and returns
null
.
Throws an exception if it receives at least one exception response, or if
a node is suspected and ignoreLeavers == true
.
- Since:
- 9.2
- Author:
- Dan Berindei
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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.finish()
Called afterResponseCollector.addResponse(Address, Response)
returnsnull
for the last response.static VoidResponseCollector
static VoidResponseCollector
Methods inherited from class org.infinispan.remoting.transport.ValidResponseCollector
addResponse
-
Method Details
-
validOnly
-
ignoreLeavers
-
addTargetNotFound
Description copied from class:ValidResponseCollector
Process a target leaving the cluster or stopping the cache.- Specified by:
addTargetNotFound
in classValidResponseCollector<Void>
- Returns:
null
to continue waiting for response, non-null
to complete with that value.
-
addException
Description copied from class:ValidResponseCollector
Process an exception from a target.- Specified by:
addException
in classValidResponseCollector<Void>
- Returns:
null
to continue waiting for responses (the default), non-null
to complete with that value.
-
addValidResponse
Description copied from class:ValidResponseCollector
Process a valid response from a target.- Specified by:
addValidResponse
in classValidResponseCollector<Void>
- Returns:
null
to continue waiting for response, non-null
to complete with that value.
-
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<Void>
- Specified by:
finish
in classValidResponseCollector<Void>
-