java - Is there a way to limit the maximum number of processing records in a Job of Spring Batch? -


is there way limit maximum number of processing records in job of spring batch?

i need have configuration control maximum number of records can processed job.

the job reading database using stored procedure, limit maximum number of fetched rows in procedure itself, looking features provided in spring batch , not able find yet.

write custom itemreader holds record count , return null ('stop reading') when limit reached.
store variable used count records step-execution context.
remember let custom itemreader implements itemstream: in manner sb save/restore record count into/from context automatically.
hope clear, english not native language.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -