- Type Parameters:
T- the type of the items to be processed (it is recommended to use a Memento like a primary key)
- All Known Implementing Classes:
public interface ChunkHandler<T>
Interface for a remote worker in the Remote Chunking pattern. A request comes from a manager process containing some items to be processed. Once the items are done with a response needs to be generated containing a summary of the result.
- Dave Syer
Method SummaryModifier and TypeMethodDescription
(ChunkRequest<T> chunk)Handle the chunk, processing all the items and returning a response summarising the result.
(ChunkRequest<T> chunk) throws ExceptionHandle the chunk, processing all the items and returning a response summarising the result. If the result is a failure then the response should say so. The handler only throws an exception if it needs to roll back a transaction and knows that the request will be re-delivered (if not to the same handler then to one processing the same Step).
chunk- a request containing the chunk to process
- a response summarising the result
Exception- if the handler needs to roll back a transaction and have the chunk re-delivered