Class AutoStateTransferResponseCollector
- All Implemented Interfaces:
ResponseCollector<AutoStateTransferResponse>
ResponseCollector that merges AutoStateTransferResponse.- Since:
- 12.1
- Author:
- Pedro Ruivo
-
Constructor Summary
ConstructorsConstructorDescriptionAutoStateTransferResponseCollector(boolean isOffline, XSiteStateTransferMode stateTransferMode, boolean ignoreStatus) -
Method Summary
Modifier and TypeMethodDescriptionaddResponse(Address sender, Response response) Called when a response is received, or when a target node becomes unavailable.finish()Called afterResponseCollector.addResponse(Address, Response)returnsnullfor the last response.voidmerge(AutoStateTransferResponse response)
-
Constructor Details
-
AutoStateTransferResponseCollector
public AutoStateTransferResponseCollector(boolean isOffline, XSiteStateTransferMode stateTransferMode, boolean ignoreStatus)
-
-
Method Details
-
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<AutoStateTransferResponse>
-
addResponse
Description copied from interface:ResponseCollectorCalled when a response is received, or when a target node becomes unavailable.When a target node leaves the cluster, this method is called with a
CacheNotFoundResponse.Should return a non-
nullresult if the request should complete with that value, ornullif 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 andaddResponse()still returnsnull,ResponseCollector.finish()will also be called to obtain a result.Thread safety:
addResponse()will *not* be called concurrently from multiple threads, and the request will not be completed whileaddResponse()is running.- Specified by:
addResponsein interfaceResponseCollector<AutoStateTransferResponse>
-
merge
-