In order to make the Map based JobRepository threadsafe, the
JobExecutino was modified to use a `CopyOnWriteArraySet` for the
collection backing the child `StepExecution` collection. However, this
collection option has bad performance characteristics when used with
large collections. When using partitioning, it can be common to have a
large number of `StepExecution` instances to add which drastically hurts
start up time.
This commit remove the use of the `CopyOnWriteArraySet` for the
`JobExecution#stepExecutions` and replaces it with a `LinkedHashSet`
wrapped via `Collection.synchronizedSet`.
Resolves BATCH-2384
Why:
Listeners should be called in normal order before some event
(i.e. read, write) and after that event in reverse order.
Side effects:
The ordering of Chunk and ItemReader Listeners is changed and will
change some behaviors of users. This change is still neccesary because
it is not only the correct and obviouse way, but also prevents new
users to hack around this problem.
This commit adds two small tweaks to the testing.adoc that demonstrates
how to import java based configuration into a unit test (instead of
importing XML based configurations).
I removed extraneous white space from non-code lines and arranged the non-code lines to be as close to 90 characters as possible. I also edited the new content.
Applied code review changes
With the more recent versions of Hibernate Validator, the groupId was
changed from org.hibernate to org.hibernate.validator. This commit
updates Spring Batch to use the correct coordinates.
Resolves BATCH-2648
I removed extraneous white space from non-code lines and made all the non-code lines be as close to 90 characters as possible. I also changed a sentence to be more consistent with other similar locations in the document.
Code review fixes applied on merge
I removed extraneous white spice from non-code lines and made the non-code lines break as close to 90 characters as possible. I also fixed a typo.
Applying cod review changes on merge
I removed extraneous white space from non-code lines and arranged the non-code lines to each be as close 90 characters as possible.
Updated PR on merge with bug fixes
In a previous commit, the JobParametersBuilder was updated to include
some code from Spring Boot that handled the incrementing of
JobParameters for a previous job. That commit brought over a private
`merge` method that is actually useful for general consumption.
This commit adds a `addJobParameters` method to the builder providing
the same functionality the `merge` method did in a public method.
I removed all the extraneous white space from non-code lines and broke the non-code lines as close to 90 characters as possible. I caught one keyword that wasn't formatted and fixed that.
I removed extraneous characters from non-code lines and made each code line be as close to 90 characters as possible. I caught a few items I missed in the editing pass (such as missing hyphen and code ticks around some code words.
Other than a couple of image references, I fixed all the lines so that they would be no longer than 90 characters and removed unneeded blank lines.
I did find a few other things (mostly periods missing from list items), and I fixed them.
I made it more readable and consistent and fixed up sentence errors. I added a TODO for a spot that could benefit from an example or two.
polishing on merge