Class TimeoutTerminationPolicy

java.lang.Object
org.springframework.batch.repeat.policy.CompletionPolicySupport
org.springframework.batch.repeat.policy.TimeoutTerminationPolicy
All Implemented Interfaces:
CompletionPolicy

public class TimeoutTerminationPolicy extends CompletionPolicySupport
Termination policy that times out after a fixed period. Allows graceful exit from a batch if the latest result comes in after the timeout expires (i.e. does not throw a timeout exception).
N.B. It may often be the case that the batch governed by this policy will be transactional, and the transaction might have its own timeout. In this case the transaction might throw a timeout exception on commit if its timeout threshold is lower than the termination policy.
Author:
Dave Syer