Class VoidResponseCollector
- java.lang.Object
-
- org.infinispan.remoting.transport.ValidResponseCollector<Void>
-
- org.infinispan.remoting.transport.impl.VoidResponseCollector
-
- All Implemented Interfaces:
ResponseCollector<Void>
public class VoidResponseCollector extends ValidResponseCollector<Void>
Response collector that discards successful responses and returnsnull
.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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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 afterResponseCollector.addResponse(Address, Response)
returnsnull
for the last response.static VoidResponseCollector
ignoreLeavers()
static VoidResponseCollector
validOnly()
-
Methods inherited from class org.infinispan.remoting.transport.ValidResponseCollector
addResponse
-
-
-
-
Method Detail
-
validOnly
public static VoidResponseCollector validOnly()
-
ignoreLeavers
public static VoidResponseCollector ignoreLeavers()
-
addTargetNotFound
protected Void addTargetNotFound(Address sender)
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
protected Void addException(Address sender, Exception exception)
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
protected Void addValidResponse(Address sender, ValidResponse response)
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
public Void 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>
-
-