Skip to main content

Module item

Module item 

Source
Expand description

Core module for Spring Batch functionality.

This module contains the fundamental components that make up the Spring Batch framework. It defines the core abstractions for batch processing, including:

  • Item processing: Interfaces for reading, processing, and writing items
  • Jobs: Container for a sequence of steps that defines a batch process
  • Steps: Individual unit of work in a batch job

§Architecture

The Spring Batch architecture follows a chunking pattern:

  1. Items are read one by one from a data source using an ItemReader
  2. Batches of items are processed using an ItemProcessor
  3. Processed items are written in chunks using an ItemWriter

This chunking approach provides benefits for performance, restartability, and transaction management.

§Module Structure

  • item: Core interfaces for reading, processing, and writing items
  • job: Job execution and management
  • step: Step definition and execution

Item processing interfaces.

Contains the fundamental interfaces that define the batch processing pipeline:

  • ItemReader: Reads items one at a time from a data source
  • ItemProcessor: Processes items from one type to another
  • ItemWriter: Writes batches of items to a destination

Structs§

CompositeItemProcessor
A composite processor that chains two processors sequentially using static dispatch.
CompositeItemProcessorBuilder
Builder for creating a chain of ItemProcessors using static dispatch.
CompositeItemWriter
A composite writer that fans out the same chunk to two writers sequentially using static dispatch.
CompositeItemWriterBuilder
Builder for creating a fan-out chain of ItemWriters using static dispatch.
PassThroughProcessor
A pass-through processor that returns items unchanged.

Traits§

ItemProcessor
A trait for processing items.
ItemReader
A trait for reading items.
ItemWriter
A trait for writing items.

Type Aliases§

ItemProcessorResult
Represents the result of processing an item by the processor.
ItemReaderResult
Represents the result of reading an item from the reader.
ItemWriterResult
Represents the result of writing items by the writer.