Skip to content

Commit

Permalink
Polish 1eed5a3
Browse files Browse the repository at this point in the history
* Fix section levels
* Fix typos in code examples
* Minor updates
  • Loading branch information
fmbenhassine committed May 26, 2020
1 parent 1eed5a3 commit 58bbc96
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions spring-batch-docs/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ of the Batch domain language.
administration.
<<step.adoc#configureStep,Configuring a Step>> :: Step configuration, different types of steps,
controlling step flow.
<<readersAndWriters.adoc#readersAndWriters,ItemReaders and ItemWriters>> :: Item readers
and writers interfaces and how to use them.
<<processor.adoc#processor,ItemProcessor>> :: Item processor interface and how to use it.
<<readersAndWriters.adoc#readersAndWriters,Item reading and writing>> :: `ItemReader`
and `ItemWriter` interfaces and how to use them.
<<processor.adoc#itemProcessor,Item processing>> :: `ItemProcessor` interface and how to use it.
<<scalability.adoc#scalability,Scaling and Parallel Processing>> :: Multi-threaded steps,
parallel steps, remote chunking and partitioning.
<<repeat.adoc#repeat,Repeat>> :: Completion policies and exception handling of repetitive actions.
Expand Down
18 changes: 9 additions & 9 deletions spring-batch-docs/asciidoc/processor.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
:toc: left
:toclevels: 4

[[processor]]
== ItemProcessor
[[itemProcessor]]
== Item processing

ifndef::onlyonetoggle[]
include::toggle.adoc[]
endif::onlyonetoggle[]

The `ItemReader` and `ItemWriter` interfaces are both very useful for their specific
The <<readersAndWriters.adoc#readersAndWriters,ItemReader and ItemWriter interfaces>> are both very useful for their specific
tasks, but what if you want to insert business logic before writing? One option for both
reading and writing is to use the composite pattern: Create an `ItemWriter` that contains
another `ItemWriter` or an `ItemReader` that contains another `ItemReader`. The following
Expand Down Expand Up @@ -117,7 +117,7 @@ public Job ioSampleJob() {
@Bean
public Step step1() {
return this.stepBuilderFactory.get("step1")
.<String, String>chunk(2)
.<Foo, Bar>chunk(2)
.reader(fooReader())
.processor(fooProcessor())
.writer(barWriter())
Expand All @@ -129,7 +129,7 @@ A difference between `ItemProcessor` and `ItemReader` or `ItemWriter` is that an
is optional for a `Step`.

[[chainingItemProcessors]]
==== Chaining ItemProcessors
=== Chaining ItemProcessors

Performing a single transformation is useful in many scenarios, but what if you want to
'chain' together multiple `ItemProcessor` implementations? This can be accomplished using
Expand Down Expand Up @@ -223,7 +223,7 @@ public Job ioSampleJob() {
@Bean
public Step step1() {
return this.stepBuilderFactory.get("step1")
.<String, String>chunk(2)
.<Foo, Foobar>chunk(2)
.reader(fooReader())
.processor(compositeProcessor())
.writer(foobarWriter())
Expand All @@ -245,7 +245,7 @@ public CompositeItemProcessor compositeProcessor() {
----

[[filteringRecords]]
==== Filtering Records
=== Filtering Records

One typical use for an item processor is to filter out records before they are passed to
the `ItemWriter`. Filtering is an action distinct from skipping. Skipping indicates that
Expand All @@ -265,7 +265,7 @@ the `ItemWriter`. As usual, an exception thrown from the `ItemProcessor` results
skip.

[[validatingInput]]
==== Validating Input
=== Validating Input

In the <<readersAndWriters.adoc#readersAndWriters,ItemReaders and ItemWriters>> chapter, multiple approaches to parsing input have been
discussed. Each major implementation throws an exception if it is not 'well-formed'. The
Expand Down Expand Up @@ -369,7 +369,7 @@ public BeanValidatingItemProcessor<Person> beanValidatingItemProcessor() throws
----

[[faultTolerant]]
==== Fault Tolerance
=== Fault Tolerance

When a chunk is rolled back, items that have been cached during reading may be
reprocessed. If a step is configured to be fault tolerant (typically by using skip or
Expand Down

0 comments on commit 58bbc96

Please sign in to comment.