C# (CSharp) Summer.Batch.Infrastructure.Repeat.Support Namespace

Classes

Name Description
RepeatTemplate Simple implementation and base class for batch templates implementing RepeatOperations. Provides a framework including interceptors and policies. Subclasses just need to provide a method that gets the next result and one that waits for all the results to be returned from concurrent processes or threads. N.B. the template accumulates thrown exceptions during the iteration, and they are all processed together when the main loop ends (i.e. finished processing the items). Clients that do not want to stop execution when an exception is thrown can use a specific ICompletionPolicy that does not finish when exceptions are received. This is not the default behaviour. Clients that want to take some business action when an exception is thrown by the IRepeatCallback can consider using a custom IRepeatListener instead of trying to customise the ICompletionPolicy. This is generally a friendlier interface to implement, and the IRepeatListener#After(RepeatContext, RepeatStatus) method is passed in the result of the callback, which would be an instance of Exception if the business processing had thrown an exception. If the exception is not to be propagated to the caller, then a non-default ICompletionPolicy needs to be provided as well, but that could be off the shelf, with the business action implemented only in the interceptor.