diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterChunkError.java b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterChunkError.java index e4262746b0..5583c5fd45 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterChunkError.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterChunkError.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ import java.lang.annotation.Target; /** - * Marks a method to be called after a has failed and been + * Marks a method to be called after a chunk has failed and been * marked for rollback.
*
* Expected signature: void afterFailedChunk(ChunkContext context) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterJob.java b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterJob.java index e2aa3cdf05..d822ff8e56 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterJob.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterJob.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,10 +27,10 @@ /** * Marks a method to be called after a {@link Job} has completed. Annotated - * methods will be called regardless of the status of the {@link JobExecution}.
+ * methods are called regardless of the status of the {@link JobExecution}.
*
* Expected signature: void afterJob({@link JobExecution} jobExecution) - * + * * @author Lucas Ward * @since 2.0 * @see JobExecutionListener diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterProcess.java b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterProcess.java index 107139653e..2b65912cc8 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterProcess.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterProcess.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,11 +26,13 @@ /** * Marks a method to be called after an item is passed to an - * {@link ItemProcessor}
+ * {@link ItemProcessor}. {@code item} is the input item. + * {@code result} is the processed item. {@code result} can be null + * if the {@code item} is filtered.
*
* Expected signature: void afterProcess(T item, S result) - * - * @author Lucas Ward + * + * @author Lucas Ward, Jay Bryant * @since 2.0 * @see ItemProcessListener */ diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterStep.java b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterStep.java index bdbb376ecc..ceadb5c12c 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterStep.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterStep.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,11 +28,11 @@ /** * Marks a method to be called after a {@link Step} has completed. Annotated - * methods will be called regardless of the status of the {@link StepExecution}.
+ * methods are called regardless of the status of the {@link StepExecution}.
*
* Expected signature: {@link ExitStatus} afterStep({@link StepExecution} * stepExecution); - * + * * @author Lucas Ward * @since 2.0 * @see StepExecutionListener diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterWrite.java b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterWrite.java index 516afb11a1..1e7188e198 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterWrite.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterWrite.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,10 +26,12 @@ import org.springframework.batch.item.ItemWriter; /** - * Marks a method to be called after an item is passed to an {@link ItemWriter}
+ * Marks a method to be called after an item is passed to an {@link ItemWriter}. + * Note that this annotation takes a {@link List} because Spring Batch + * generally processes a group of items (for the sake of efficiency).
*
* Expected signature: void afterWrite({@link List}<? extends S> items) - * + * * @author Lucas Ward * @since 2.0 * @see ItemWriteListener diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/BeforeJob.java b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/BeforeJob.java index ff2c077f42..dc4cf037ae 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/BeforeJob.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/BeforeJob.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,11 +29,11 @@ /** * Marks a method to be called before a {@link Job} is executed, which comes - * after a {@link JobExecution} is created and persisted, but before the first + * after a {@link JobExecution} is created and persisted but before the first * {@link Step} is executed.
*
* Expected signature: void beforeJob({@link JobExecution} jobExecution) - * + * * @author Lucas Ward * @since 2.0 * @see JobExecutionListener diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/BeforeStep.java b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/BeforeStep.java index d6daaf65ca..2a3e1df658 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/BeforeStep.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/BeforeStep.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,11 +27,11 @@ /** * Marks a method to be called before a {@link Step} is executed, which comes - * after a {@link StepExecution} is created and persisted, but before the first + * after a {@link StepExecution} is created and persisted but before the first * item is read.
*
* Expected signature: void beforeStep({@link StepExecution} stepExecution) - * + * * @author Lucas Ward * @since 2.0 * @see StepExecutionListener diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/BeforeWrite.java b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/BeforeWrite.java index 9e558ad73d..fcd6f57cb1 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/BeforeWrite.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/BeforeWrite.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,10 +26,10 @@ import org.springframework.batch.item.ItemWriter; /** - * Marks a method to be called before an item is passed to an {@link ItemWriter}
+ * Marks a method to be called before an item is passed to an {@link ItemWriter}.
*
* Expected signature: void beforeWrite({@link List}<? extends S> items) - * + * * @author Lucas Ward * @since 2.0 * @see ItemWriteListener diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnProcessError.java b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnProcessError.java index 828793ad75..d01e623aad 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnProcessError.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnProcessError.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,10 +26,10 @@ /** * Marks a method to be called if an exception is thrown by an - * {@link ItemProcessor}
+ * {@link ItemProcessor}.
*
* Expected signature: void onProcessError(T item, {@link Exception} e) - * + * * @author Lucas Ward * @since 2.0 * @see ItemProcessListener diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnReadError.java b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnReadError.java index 971e4b7dae..d6e3bb50e9 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnReadError.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnReadError.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,10 +25,10 @@ /** * Marks a method to be called if an exception is thrown by an - * {@link ItemReader}
+ * {@link ItemReader}.
*
* Expected signature: void onReadError({@link Exception} ex) - * + * * @author Lucas Ward * @since 2.0 * @see ItemReadListener diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnSkipInProcess.java b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnSkipInProcess.java index 71f49852f4..c3a3c2fce6 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnSkipInProcess.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnSkipInProcess.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,7 @@ * thrown in the {@link ItemProcessor}.
*
* Expected signature: void onSkipInProcess(T item, {@link Throwable} t) - * + * * @author Lucas Ward * @since 2.0 * @see SkipListener diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnSkipInRead.java b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnSkipInRead.java index b733461fa0..0ba04ce417 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnSkipInRead.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnSkipInRead.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,10 +26,10 @@ /** * Marks a method to be called when an item is skipped due to an exception - * thrown in the {@link ItemReader}
+ * thrown in the {@link ItemReader}.
*
* Expected signature: void onSkipInRead({@link Throwable} t) - * + * * @author Lucas Ward * @since 2.0 * @see SkipListener diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnWriteError.java b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnWriteError.java index c4c9f7d876..89457d9e61 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnWriteError.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/annotation/OnWriteError.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,11 +27,13 @@ /** * Marks a method to be called if an exception is thrown by an - * {@link ItemWriter}
+ * {@link ItemWriter}. Note that this annotation takes a {@link List} + * because Spring Batch generally processes a group of items + * (for the sake of efficiency).
*
* Expected signature: void onWriteError({@link Exception} exception, * {@link List}<? extends S> items) - * + * * @author Lucas Ward * @since 2.0 * @see ItemWriteListener @@ -40,4 +42,4 @@ @Target({ElementType.METHOD}) public @interface OnWriteError { -} \ No newline at end of file +}