Skip to content

Commit 8d1c1c2

Browse files
fmbenhassinemminella
authored andcommitted
Polish documentation
1 parent 9307c87 commit 8d1c1c2

File tree

5 files changed

+19
-20
lines changed

5 files changed

+19
-20
lines changed

spring-batch-docs/asciidoc/common-patterns.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public Step simpleStep() {
7878
}
7979
----
8080

81-
NOTE: if your listener does anything in an `onError()` method, it must be inside
81+
IMPORTANT: if your listener does anything in an `onError()` method, it must be inside
8282
a transaction that is going to be rolled back. If you need to use a transactional
8383
resource, such as a database, inside an `onError()` method, consider adding a declarative
8484
transaction to that method (see Spring Core Reference Guide for details), and giving its

spring-batch-docs/asciidoc/job.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ declarative flow control (`Decision`) and externalization of flow definitions (`
5959
There are multiple implementations of the <<job.adoc#configureJob,`Job`>> interface, however, the namespace
6060
abstracts away the differences in configuration. It has only three
6161
required dependencies: a name, a `JobRepository` , and
62-
a list of ``Step``s.
62+
a list of `Step` instances.
6363

6464
[source, xml, role="xmlContent"]
6565
----

spring-batch-docs/asciidoc/readersAndWriters.adoc

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ return a `String` or an array of `String` objects. This really only gets you hal
489489
there. A `FieldSet` is Spring Batch's abstraction for enabling the binding of fields from
490490
a file resource. It allows developers to work with file input in much the same way as
491491
they would work with database input. A `FieldSet` is conceptually similar to a JDBC
492-
`ResultSet`. ``FieldSet``s only require one argument: a `String` array of tokens.
492+
`ResultSet`. A `FieldSet` requires only one argument: a `String` array of tokens.
493493
Optionally, you can also configure the names of the fields so that the fields may be
494494
accessed either by index or name as patterned after `ResultSet`, as shown in the following
495495
example:
@@ -610,8 +610,8 @@ delimiter. The most common delimiter is a comma, but pipes or semicolons are oft
610610
as well.
611611
* `FixedLengthTokenizer`: Used for files where fields in a record are each a "fixed
612612
width". The width of each field must be defined for each record type.
613-
* `PatternMatchingCompositeLineTokenizer`: Determines which among a list of
614-
``LineTokenizer``s should be used on a particular line by checking against a pattern.
613+
* `PatternMatchingCompositeLineTokenizer`: Determines which `LineTokenizer` among a list of
614+
tokenizers should be used on a particular line by checking against a pattern.
615615

616616
[[fieldSetMapper]]
617617
===== FieldSetMapper
@@ -941,8 +941,8 @@ though a "LINEA" has more information than a "LINEB".
941941
The `ItemReader` reads each line individually, but we must specify different
942942
`LineTokenizer` and `FieldSetMapper` objects so that the `ItemWriter` receives the
943943
correct items. The `PatternMatchingCompositeLineMapper` makes this easy by allowing maps
944-
of patterns to ``LineTokenizer``s and patterns to ``FieldSetMapper``s to be configured, as
945-
shown in the following example:
944+
of patterns to `LineTokenizer` instances and patterns to `FieldSetMapper` instances to be
945+
configured, as shown in the following example:
946946

947947
.XML Configuration
948948
[source, xml, role="xmlContent"]
@@ -990,10 +990,10 @@ public PatternMatchingCompositeLineMapper orderFileLineMapper() {
990990
}
991991
----
992992

993-
In this example, "LINEA" and "LINEB" have separate ``LineTokenizer``s, but they both use
993+
In this example, "LINEA" and "LINEB" have separate `LineTokenizer` instances, but they both use
994994
the same `FieldSetMapper`.
995995

996-
The `PatternMatchingCompositeLineMapper` makes use of the ``PatternMatcher``'s match method
996+
The `PatternMatchingCompositeLineMapper` uses the `PatternMatcher#match` method
997997
in order to select the correct delegate for each line. The `PatternMatcher` allows for
998998
two wildcard characters with special meaning: the question mark ("?") matches exactly one
999999
character, while the asterisk ("\*") matches zero or more characters. Note that, in the
@@ -1023,8 +1023,7 @@ alone.
10231023

10241024
It is also common for a flat file to contain records that each span multiple lines. To
10251025
handle this situation, a more complex strategy is required. A demonstration of this
1026-
common pattern can be found in the
1027-
link:$$https://github.com/spring-projects/spring-batch/tree/master/spring-batch-samples#multiline$$[multiLineRecords] sample.
1026+
common pattern can be found in the `multiLineRecords` sample.
10281027

10291028
[[exceptionHandlingInFlatFiles]]
10301029
===== Exception Handling in Flat Files
@@ -1451,7 +1450,7 @@ the parsing process by allowing the user to provide only callbacks).
14511450

14521451
We need to consider how XML input and output works in Spring Batch. First, there are a
14531452
few concepts that vary from file reading and writing but are common across Spring Batch
1454-
XML processing. With XML processing, instead of lines of records (``FieldSet``s) that need
1453+
XML processing. With XML processing, instead of lines of records (`FieldSet` instances) that need
14551454
to be tokenized, it is assumed an XML resource is a collection of 'fragments'
14561455
corresponding to individual records, as shown in the following image:
14571456

@@ -1791,7 +1790,7 @@ as with any `ItemReader`, adding extra input (in this case a file) could cause p
17911790
issues when restarting. It is recommended that batch jobs work with their own individual
17921791
directories until completed successfully.
17931792

1794-
NOTE: Input resources are ordered using `MultiResourceItemReader#setComparator(Comparator)`
1793+
NOTE: Input resources are ordered by using `MultiResourceItemReader#setComparator(Comparator)`
17951794
to make sure resource ordering is preserved between job runs in restart scenario.
17961795

17971796
[[database]]
@@ -2387,9 +2386,9 @@ number of entities read from the database for each query execution.
23872386
[[databaseItemWriters]]
23882387
==== Database ItemWriters
23892388

2390-
While both flat files and XML have specific ``ItemWriter``s, there is no exact equivalent
2389+
While both flat files and XML files have a specific `ItemWriter` instance, there is no exact equivalent
23912390
in the database world. This is because transactions provide all the needed functionality.
2392-
``ItemWriter``s are necessary for files because they must act as if they're transactional,
2391+
`ItemWriter` implementations are necessary for files because they must act as if they're transactional,
23932392
keeping track of written items and flushing or clearing at the appropriate times.
23942393
Databases have no need for this functionality, since the write is already contained in a
23952394
transaction. Users can create their own DAOs that implement the `ItemWriter` interface or

spring-batch-docs/asciidoc/scalability.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Spring Batch provides some implementations of `ItemWriter` and `ItemReader`. Us
138138
they say in the Javadoc if they are thread safe or not or what you have to do to avoid
139139
problems in a concurrent environment. If there is no information in the Javadoc, you can
140140
check the implementation to see if there is any state. If a reader is not thread safe,
141-
you can decorate it with the built-in `SynchronizedItemStreamReader` or use it in your own
141+
you can decorate it with the provided `SynchronizedItemStreamReader` or use it in your own
142142
synchronizing delegator. You can synchronize the call to `read()` and as long as the
143143
processing and writing is the most expensive part of the chunk, your step may still
144144
complete much faster than it would in a single threaded configuration.
@@ -254,7 +254,7 @@ and work is shared through the middleware, so that, if the listeners are all eag
254254
consumers, then load balancing is automatic.
255255

256256
The middleware has to be durable, with guaranteed delivery and a single consumer for each
257-
message. JMS is the obvious candidate, but other options (such as Java Spaces) exist in
257+
message. JMS is the obvious candidate, but other options (such as JavaSpaces) exist in
258258
the grid computing and shared memory product space.
259259

260260
See the section on

spring-batch-docs/asciidoc/step.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ If the element specifies that `merge="true"`, then the child's list is combined
258258
parent's instead of overriding it.
259259

260260
[role="xmlContent"]
261-
In the following example, the `Step` "concreteStep3" is created with two listeners:
261+
In the following example, the `Step` "concreteStep3", is created with two listeners:
262262
`listenerOne` and `listenerTwo`:
263263

264264
[source, xml, role="xmlContent"]
@@ -1620,7 +1620,7 @@ public Job job() {
16201620
}
16211621
----
16221622

1623-
If no transitions are defined for a `Step`, then the ``Job``'s statuses is defined as
1623+
If no transitions are defined for a `Step`, then the status of the `Job` is defined as
16241624
follows:
16251625

16261626
* If the `Step` ends with `ExitStatus` FAILED, then the `BatchStatus` and `ExitStatus` of
@@ -1837,7 +1837,7 @@ public Job job() {
18371837
[[split-flows]]
18381838
==== Split Flows
18391839

1840-
Every scenario described so far has involved a `Job` that executes its ``Step``s one at a
1840+
Every scenario described so far has involved a `Job` that executes its steps one at a
18411841
time in a linear fashion. In addition to this typical style, Spring Batch also allows
18421842
for a job to be configured with parallel flows.
18431843

0 commit comments

Comments
 (0)