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 VoidaddException(Address sender, Exception exception)Process an exception from a target.protected VoidaddTargetNotFound(Address sender)Process a target leaving the cluster or stopping the cache.protected VoidaddValidResponse(Address sender, ValidResponse response)Process a valid response from a target.Voidfinish()Called afterResponseCollector.addResponse(Address, Response)returnsnullfor the last response.static VoidResponseCollectorignoreLeavers()static VoidResponseCollectorvalidOnly()-
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:ValidResponseCollectorProcess a target leaving the cluster or stopping the cache.- Specified by:
addTargetNotFoundin classValidResponseCollector<Void>- Returns:
nullto continue waiting for response, non-nullto complete with that value.
-
addException
protected Void addException(Address sender, Exception exception)
Description copied from class:ValidResponseCollectorProcess an exception from a target.- Specified by:
addExceptionin classValidResponseCollector<Void>- Returns:
nullto continue waiting for responses (the default), non-nullto complete with that value.
-
addValidResponse
protected Void addValidResponse(Address sender, ValidResponse response)
Description copied from class:ValidResponseCollectorProcess a valid response from a target.- Specified by:
addValidResponsein classValidResponseCollector<Void>- Returns:
nullto continue waiting for response, non-nullto complete with that value.
-
finish
public Void finish()
Description copied from interface:ResponseCollectorCalled afterResponseCollector.addResponse(Address, Response)returnsnullfor 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:
finishin interfaceResponseCollector<Void>- Specified by:
finishin classValidResponseCollector<Void>
-
-