Skip to content

Commit

Permalink
Change adaptor word to adapter
Browse files Browse the repository at this point in the history
Signed-off-by: Taeik Lim <[email protected]>
  • Loading branch information
acktsap committed Mar 8, 2024
1 parent 688aae2 commit 93e8af5
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Support for [Spring Batch 5.0.0](https://github.com/spring-projects/spring-batch
- Deprecate throttleLimit method
- ItemStreamWriterDelegate
- Change the signature of write method
- Remove deprecated adaptor classes
- Remove deprecated adapter classes

#### Bug fixes & Improvements

Expand Down
4 changes: 2 additions & 2 deletions doc/en/step/item-stream-reader-processor-writer.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Spring uses a reactive library called [Reactor](https://projectreactor.io/), whi

A chunk-oriented step in Spring Batch consists of `ItemReader`, `ItemProcessor`, and `ItemWriter`, which are usually defined separately and then assembled to define a step. However, there are some issues with this approach: it is difficult to share data between `ItemReader`, `ItemProcessor`, and `ItemWriter`, and you need to see each respective file to understand the batch flow. Also, if the classes are not reused, they can make the elements of a job less coherent.

To resolve such issues, `ItemStreamReaderProcessorWriter` provides an adaptor to use `Flux` and helps you define `ItemReader`, `ItemProcessor`, and `ItemWriter` in a single file.
To resolve such issues, `ItemStreamReaderProcessorWriter` provides an adapter to use `Flux` and helps you define `ItemReader`, `ItemProcessor`, and `ItemWriter` in a single file.

Because Spring Batch Plus has compileOnly dependencies on Reactor, you need to manually add them to use `ItemStreamReaderProcessorWriter`.

Expand Down Expand Up @@ -502,4 +502,4 @@ open class TestJobConfig(
}
}
}
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
import org.springframework.lang.NonNull;

/**
* An adaptor factory for {@link ItemStreamReaderDelegate}, {@link ItemProcessorDelegate},
* An adapter factory for {@link ItemStreamReaderDelegate}, {@link ItemProcessorDelegate},
* {@link ItemStreamWriterDelegate}.
*
* @since 0.1.0
*/
public final class AdapterFactory {

/**
* Create an adaptor which adapt {@link ItemStreamReaderDelegate} to {@link ItemStreamReader}
* Create an adapter which adapt {@link ItemStreamReaderDelegate} to {@link ItemStreamReader}
* with {@link StepScope} bound proxy implementation. It creates new instance for every {@link StepScope}.
*
* @param delegate a delegate
Expand All @@ -48,7 +48,7 @@ public static <T> ItemStreamReader<T> itemStreamReader(@NonNull ItemStreamReader
}

/**
* Create an adaptor which adapt {@link ItemProcessorDelegate} to {@link ItemProcessor}.
* Create an adapter which adapt {@link ItemProcessorDelegate} to {@link ItemProcessor}.
*
* @param delegate a delegate
* @return an adapted ItemProcessor
Expand All @@ -60,7 +60,7 @@ public static <I, O> ItemProcessor<I, O> itemProcessor(@NonNull ItemProcessorDel
}

/**
* Create an adaptor which adapt {@link ItemStreamWriterDelegate} to {@link ItemStreamWriter}.
* Create an adapter which adapt {@link ItemStreamWriterDelegate} to {@link ItemStreamWriter}.
*
* @param delegate a delegate
* @return an adapted ItemStreamWriter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
import org.springframework.lang.NonNull;

/**
* An adaptor which adapt {@link ItemProcessorDelegate} to {@link ItemProcessor}.
* An adapter which adapt {@link ItemProcessorDelegate} to {@link ItemProcessor}.
*
* @since 0.1.0
*/
public class ItemProcessorAdapter<I, O> implements ItemProcessor<I, O> {

/**
* Create an adaptor which adapt {@link ItemProcessorDelegate} to {@link ItemProcessor}.
* Create an adapter which adapt {@link ItemProcessorDelegate} to {@link ItemProcessor}.
*
* @param delegate a delegate
* @return an adapted ItemProcessor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
import reactor.core.publisher.Flux;

/**
* An adaptor which adapt {@link ItemStreamFluxReaderDelegate} to {@link ItemStreamReader}.
* An adapter which adapt {@link ItemStreamFluxReaderDelegate} to {@link ItemStreamReader}.
*
* @since 1.1.0
*/
public class ItemStreamFluxReaderAdapter<T> implements ItemStreamReader<T> {

/**
* Create an adaptor which adapt {@link ItemStreamFluxReaderDelegate} to {@link ItemStreamReader}.
* Create an adapter which adapt {@link ItemStreamFluxReaderDelegate} to {@link ItemStreamReader}.
*
* @param delegate a delegate
* @return an adapted ItemStreamReader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
import org.springframework.lang.NonNull;

/**
* An adaptor which adapt {@link ItemStreamIterableReaderDelegate} to {@link ItemStreamReader}.
* An adapter which adapt {@link ItemStreamIterableReaderDelegate} to {@link ItemStreamReader}.
*
* @since 1.1.0
*/
public class ItemStreamIterableReaderAdapter<T> implements ItemStreamReader<T> {

/**
* Create an adaptor which adapt {@link ItemStreamIterableReaderDelegate} to {@link ItemStreamReader}.
* Create an adapter which adapt {@link ItemStreamIterableReaderDelegate} to {@link ItemStreamReader}.
*
* @param delegate a delegate
* @return an adapted ItemStreamReader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
import org.springframework.lang.NonNull;

/**
* An adaptor which adapt {@link ItemStreamIteratorReaderDelegate} to {@link ItemStreamReader}.
* An adapter which adapt {@link ItemStreamIteratorReaderDelegate} to {@link ItemStreamReader}.
*
* @since 1.1.0
*/
public class ItemStreamIteratorReaderAdapter<T> implements ItemStreamReader<T> {

/**
* Create an adaptor which adapt {@link ItemStreamIteratorReaderDelegate} to {@link ItemStreamReader}.
* Create an adapter which adapt {@link ItemStreamIteratorReaderDelegate} to {@link ItemStreamReader}.
*
* @param delegate a delegate
* @return an adapted ItemStreamReader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
import reactor.core.publisher.Flux;

/**
* An adaptor which adapt {@link ItemStreamReaderDelegate} to {@link ItemStreamReader}.
* An adapter which adapt {@link ItemStreamReaderDelegate} to {@link ItemStreamReader}.
*
* @since 0.1.0
*/
public class ItemStreamReaderAdapter<T> implements ItemStreamReader<T> {

/**
* Create an adaptor which adapt {@link ItemStreamReaderDelegate} to {@link ItemStreamReader}.
* Create an adapter which adapt {@link ItemStreamReaderDelegate} to {@link ItemStreamReader}.
*
* @param delegate a delegate
* @return an adapted ItemStreamReader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.springframework.batch.item.ItemStreamWriter;

/**
* A simple adaptor for stream reader, writer. It can represent
* A simple adapter for stream reader, writer. It can represent
* {@link ItemStreamReader}, {@link ItemStreamWriter} in a single class.
*
* @since 0.1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
import org.springframework.lang.NonNull;

/**
* An adaptor which adapt {@link ItemStreamSimpleReaderDelegate} to {@link ItemStreamReader}.
* An adapter which adapt {@link ItemStreamSimpleReaderDelegate} to {@link ItemStreamReader}.
*
* @since 1.1.0
*/
public class ItemStreamSimpleReaderAdapter<T> implements ItemStreamReader<T> {

/**
* Create an adaptor which adapt {@link ItemStreamSimpleReaderDelegate} to {@link ItemStreamReader}.
* Create an adapter which adapt {@link ItemStreamSimpleReaderDelegate} to {@link ItemStreamReader}.
*
* @param delegate a delegate
* @return an adapted ItemStreamReader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
import org.springframework.lang.NonNull;

/**
* An adaptor which adapt {@link ItemStreamWriterDelegate} to {@link ItemStreamWriter}.
* An adapter which adapt {@link ItemStreamWriterDelegate} to {@link ItemStreamWriter}.
*
* @since 0.1.0
*/
public class ItemStreamWriterAdapter<T> implements ItemStreamWriter<T> {

/**
* Create an adaptor which adapt {@link ItemStreamWriterDelegate} to {@link ItemStreamWriter}.
* Create an adapter which adapt {@link ItemStreamWriterDelegate} to {@link ItemStreamWriter}.
*
* @param delegate a delegate
* @return an adapted ItemStreamWriter
Expand Down

0 comments on commit 93e8af5

Please sign in to comment.