Skip to content

Commit 9b87824

Browse files
Jay Bryantfmbenhassine
Jay Bryant
authored andcommitted
Editing pass for reference docs
Issue #4083
1 parent d00cd94 commit 9b87824

20 files changed

+1323
-1374
lines changed

spring-batch-docs/src/main/asciidoc/appendix.adoc

+52-56
Original file line numberDiff line numberDiff line change
@@ -3,133 +3,129 @@
33
:toclevels: 4
44

55
[[listOfReadersAndWriters]]
6-
76
[appendix]
87
== List of ItemReaders and ItemWriters
98

109
[[itemReadersAppendix]]
11-
1210
=== Item Readers
1311

1412
.Available Item Readers
1513
[options="header"]
1614
|===============
1715
|Item Reader|Description
18-
|AbstractItemCountingItemStreamItemReader|Abstract base class that provides basic
16+
|`AbstractItemCountingItemStreamItemReader`|Abstract base class that provides basic
1917
restart capabilities by counting the number of items returned from
2018
an `ItemReader`.
21-
|AggregateItemReader|An `ItemReader` that delivers a list as its
19+
|`AggregateItemReader`|An `ItemReader` that delivers a list as its
2220
item, storing up objects from the injected `ItemReader` until they
23-
are ready to be packed out as a collection. This class must be used
24-
as a wrapper for a custom `ItemReader` that can identify the record
25-
boundaries. The custom reader should mark the beginning and end of
26-
records by returning an `AggregateItem` which responds `true` to its
27-
query methods `isHeader()` and `isFooter()`. Note that this reader
21+
are ready to be packed out as a collection. This class must be used
22+
as a wrapper for a custom `ItemReader` that can identify the record
23+
boundaries. The custom reader should mark the beginning and end of
24+
records by returning an `AggregateItem` which responds `true` to its
25+
query methods (`isHeader()` and `isFooter()`). Note that this reader
2826
is not part of the library of readers provided by Spring Batch
2927
but given as a sample in `spring-batch-samples`.
30-
|AmqpItemReader|Given a Spring `AmqpTemplate`, it provides
28+
|`AmqpItemReader`|Given a Spring `AmqpTemplate`, it provides
3129
synchronous receive methods. The `receiveAndConvert()` method
3230
lets you receive POJO objects.
33-
|KafkaItemReader|An `ItemReader` that reads messages from an Apache Kafka topic.
31+
|`KafkaItemReader`|An `ItemReader` that reads messages from an Apache Kafka topic.
3432
It can be configured to read messages from multiple partitions of the same topic.
3533
This reader stores message offsets in the execution context to support restart capabilities.
36-
|FlatFileItemReader|Reads from a flat file. Includes `ItemStream`
37-
and `Skippable` functionality. See link:readersAndWriters.html#flatFileItemReader[`FlatFileItemReader`].
38-
|HibernateCursorItemReader|Reads from a cursor based on an HQL query. See
34+
|`FlatFileItemReader`|Reads from a flat file. Includes `ItemStream`
35+
and `Skippable` functionality. See link:readersAndWriters.html#flatFileItemReader["`FlatFileItemReader`"].
36+
|`HibernateCursorItemReader`|Reads from a cursor based on an HQL query. See
3937
link:readersAndWriters.html#cursorBasedItemReaders[`Cursor-based ItemReaders`].
40-
|HibernatePagingItemReader|Reads from a paginated HQL query
41-
|ItemReaderAdapter|Adapts any class to the
38+
|`HibernatePagingItemReader`|Reads from a paginated HQL query.
39+
|`ItemReaderAdapter`|Adapts any class to the
4240
`ItemReader` interface.
43-
|JdbcCursorItemReader|Reads from a database cursor via JDBC. See
44-
link:readersAndWriters.html#cursorBasedItemReaders[`Cursor-based ItemReaders`].
45-
|JdbcPagingItemReader|Given an SQL statement, pages through the rows,
41+
|`JdbcCursorItemReader`|Reads from a database cursor over JDBC. See
42+
link:readersAndWriters.html#cursorBasedItemReaders["`Cursor-based ItemReaders`"].
43+
|`JdbcPagingItemReader`|Given an SQL statement, pages through the rows,
4644
such that large datasets can be read without running out of
4745
memory.
48-
|JmsItemReader|Given a Spring `JmsOperations` object and a JMS
49-
Destination or destination name to which to send errors, provides items
46+
|`JmsItemReader`|Given a Spring `JmsOperations` object and a JMS
47+
destination or destination name to which to send errors, provides items
5048
received through the injected `JmsOperations#receive()`
5149
method.
52-
|JpaPagingItemReader|Given a JPQL statement, pages through the
50+
|`JpaPagingItemReader`|Given a JPQL statement, pages through the
5351
rows, such that large datasets can be read without running out of
5452
memory.
55-
|ListItemReader|Provides the items from a list, one at a
53+
|`ListItemReader`|Provides the items from a list, one at a
5654
time.
57-
|MongoItemReader|Given a `MongoOperations` object and a JSON-based MongoDB
55+
|`MongoItemReader`|Given a `MongoOperations` object and a JSON-based MongoDB
5856
query, provides items received from the `MongoOperations#find()` method.
59-
|Neo4jItemReader|Given a `Neo4jOperations` object and the components of a
57+
|`Neo4jItemReader`|Given a `Neo4jOperations` object and the components of a
6058
Cyhper query, items are returned as the result of the Neo4jOperations.query
6159
method.
62-
|RepositoryItemReader|Given a Spring Data `PagingAndSortingRepository` object,
60+
|`RepositoryItemReader`|Given a Spring Data `PagingAndSortingRepository` object,
6361
a `Sort`, and the name of method to execute, returns items provided by the
6462
Spring Data repository implementation.
65-
|StoredProcedureItemReader|Reads from a database cursor resulting from the
63+
|`StoredProcedureItemReader`|Reads from a database cursor resulting from the
6664
execution of a database stored procedure. See link:readersAndWriters.html#StoredProcedureItemReader[`StoredProcedureItemReader`]
67-
|StaxEventItemReader|Reads via StAX. see link:readersAndWriters.html#StaxEventItemReader[`StaxEventItemReader`].
68-
|JsonItemReader|Reads items from a Json document. see link:readersAndWriters.html#JsonItemReader[`JsonItemReader`].
65+
|`StaxEventItemReader`|Reads over StAX. see link:readersAndWriters.html#StaxEventItemReader[`StaxEventItemReader`].
66+
|`JsonItemReader`|Reads items from a Json document. see link:readersAndWriters.html#JsonItemReader[`JsonItemReader`].
6967

7068
|===============
7169

7270

7371
[[itemWritersAppendix]]
74-
75-
7672
=== Item Writers
7773

7874
.Available Item Writers
7975
[options="header"]
8076
|===============
8177
|Item Writer|Description
82-
|AbstractItemStreamItemWriter|Abstract base class that combines the
78+
|`AbstractItemStreamItemWriter`|Abstract base class that combines the
8379
`ItemStream` and
8480
`ItemWriter` interfaces.
85-
|AmqpItemWriter|Given a Spring `AmqpTemplate`, it provides
81+
|`AmqpItemWriter`|Given a Spring `AmqpTemplate`, provides
8682
for a synchronous `send` method. The `convertAndSend(Object)`
8783
method lets you send POJO objects.
88-
|CompositeItemWriter|Passes an item to the `write` method of each
84+
|`CompositeItemWriter`|Passes an item to the `write` method of each item
8985
in an injected `List` of `ItemWriter` objects.
90-
|FlatFileItemWriter|Writes to a flat file. Includes `ItemStream` and
91-
Skippable functionality. See link:readersAndWriters.html#flatFileItemWriter[`FlatFileItemWriter`].
92-
|GemfireItemWriter|Using a `GemfireOperations` object, items are either written
86+
|`FlatFileItemWriter`|Writes to a flat file. Includes `ItemStream` and
87+
Skippable functionality. See link:readersAndWriters.html#flatFileItemWriter["`FlatFileItemWriter`"].
88+
|`GemfireItemWriter`|Using a `GemfireOperations` object, items are either written
9389
or removed from the Gemfire instance based on the configuration of the delete
9490
flag.
95-
|HibernateItemWriter|This item writer is Hibernate-session aware
96-
and handles some transaction-related work that a non-"hibernate-aware"
91+
|`HibernateItemWriter`|This item writer is Hibernate-session aware
92+
and handles some transaction-related work that a non-"`hibernate-aware`"
9793
item writer would not need to know about and then delegates
9894
to another item writer to do the actual writing.
99-
|ItemWriterAdapter|Adapts any class to the
95+
|`ItemWriterAdapter`|Adapts any class to the
10096
`ItemWriter` interface.
101-
|JdbcBatchItemWriter|Uses batching features from a
97+
|`JdbcBatchItemWriter`|Uses batching features from a
10298
`PreparedStatement`, if available, and can
10399
take rudimentary steps to locate a failure during a
104100
`flush`.
105-
|JmsItemWriter|Using a `JmsOperations` object, items are written
101+
|`JmsItemWriter`|Using a `JmsOperations` object, items are written
106102
to the default queue through the `JmsOperations#convertAndSend()` method.
107-
|JpaItemWriter|This item writer is JPA EntityManager-aware
108-
and handles some transaction-related work that a non-"JPA-aware"
103+
|`JpaItemWriter`|This item writer is JPA `EntityManager`-aware
104+
and handles some transaction-related work that a non-"`JPA-aware`"
109105
`ItemWriter` would not need to know about and
110106
then delegates to another writer to do the actual writing.
111-
|KafkaItemWriter|Using a `KafkaTemplate` object, items are written to the default topic through the
112-
`KafkaTemplate#sendDefault(Object, Object)` method using a `Converter` to map the key from the item.
107+
|`KafkaItemWriter`|Using a `KafkaTemplate` object, items are written to the default topic through the
108+
`KafkaTemplate#sendDefault(Object, Object)` method by using a `Converter` to map the key from the item.
113109
A delete flag can also be configured to send delete events to the topic.
114-
|MimeMessageItemWriter|Using Spring's `JavaMailSender`, items of type `MimeMessage`
110+
|`MimeMessageItemWriter`|Using Spring's `JavaMailSender`, items of type `MimeMessage`
115111
are sent as mail messages.
116-
|MongoItemWriter|Given a `MongoOperations` object, items are written
112+
|`MongoItemWriter`|Given a `MongoOperations` object, items are written
117113
through the `MongoOperations.save(Object)` method. The actual write is delayed
118114
until the last possible moment before the transaction commits.
119-
|Neo4jItemWriter|Given a `Neo4jOperations` object, items are persisted through the
120-
`save(Object)` method or deleted through the `delete(Object)` per the
115+
|`Neo4jItemWriter`|Given a `Neo4jOperations` object, items are persisted through the
116+
`save(Object)` method or deleted through the `delete(Object)`, as dictated by the
121117
`ItemWriter's` configuration
122-
|PropertyExtractingDelegatingItemWriter|Extends `AbstractMethodInvokingDelegator`
118+
|`PropertyExtractingDelegatingItemWriter`|Extends `AbstractMethodInvokingDelegator`
123119
creating arguments on the fly. Arguments are created by retrieving
124120
the values from the fields in the item to be processed (through a
125121
`SpringBeanWrapper`), based on an injected array of field
126122
names.
127-
|RepositoryItemWriter|Given a Spring Data `CrudRepository` implementation,
123+
|`RepositoryItemWriter`|Given a Spring Data `CrudRepository` implementation,
128124
items are saved through the method specified in the configuration.
129-
|StaxEventItemWriter|Uses a `Marshaller` implementation to
130-
convert each item to XML and then writes it to an XML file using
125+
|`StaxEventItemWriter`|Uses a `Marshaller` implementation to
126+
convert each item to XML and then writes it to an XML file by using
131127
StAX.
132-
|JsonFileItemWriter|Uses a `JsonObjectMarshaller` implementation to
133-
convert each item to Json and then writes it to an Json file.
128+
|`JsonFileItemWriter`|Uses a `JsonObjectMarshaller` implementation to
129+
convert each item to Json and then writes it to a Json file.
134130

135131
|===============

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

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
:toclevels: 4
44

55
[[commonPatterns]]
6-
76
== Common Batch Patterns
87

98
ifndef::onlyonetoggle[]

0 commit comments

Comments
 (0)