File tree Expand file tree Collapse file tree 13 files changed +45
-39
lines changed
spring-batch-core/src/main/java/org/springframework/batch/core/annotation Expand file tree Collapse file tree 13 files changed +45
-39
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2012-2013 the original author or authors.
2
+ * Copyright 2012-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
24
24
import java .lang .annotation .Target ;
25
25
26
26
/**
27
- * Marks a method to be called after a has failed and been
27
+ * Marks a method to be called after a chunk has failed and been
28
28
* marked for rollback.<br>
29
29
* <br>
30
30
* Expected signature: void afterFailedChunk(ChunkContext context)
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2006-2007 the original author or authors.
2
+ * Copyright 2006-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
27
27
28
28
/**
29
29
* Marks a method to be called after a {@link Job} has completed. Annotated
30
- * methods will be called regardless of the status of the {@link JobExecution}. <br>
30
+ * methods are called regardless of the status of the {@link JobExecution}. <br>
31
31
* <br>
32
32
* Expected signature: void afterJob({@link JobExecution} jobExecution)
33
- *
33
+ *
34
34
* @author Lucas Ward
35
35
* @since 2.0
36
36
* @see JobExecutionListener
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2006-2007 the original author or authors.
2
+ * Copyright 2006-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
26
26
27
27
/**
28
28
* Marks a method to be called after an item is passed to an
29
- * {@link ItemProcessor} <br>
29
+ * {@link ItemProcessor}. {@code item} is the input item.
30
+ * {@code result} is the processed item. {@code result} can be null
31
+ * if the {@code item} is filtered.<br>
30
32
* <br>
31
33
* Expected signature: void afterProcess(T item, S result)
32
- *
33
- * @author Lucas Ward
34
+ *
35
+ * @author Lucas Ward, Jay Bryant
34
36
* @since 2.0
35
37
* @see ItemProcessListener
36
38
*/
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2006-2007 the original author or authors.
2
+ * Copyright 2006-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
28
28
29
29
/**
30
30
* Marks a method to be called after a {@link Step} has completed. Annotated
31
- * methods will be called regardless of the status of the {@link StepExecution}. <br>
31
+ * methods are called regardless of the status of the {@link StepExecution}. <br>
32
32
* <br>
33
33
* Expected signature: {@link ExitStatus} afterStep({@link StepExecution}
34
34
* stepExecution);
35
- *
35
+ *
36
36
* @author Lucas Ward
37
37
* @since 2.0
38
38
* @see StepExecutionListener
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2006-2007 the original author or authors.
2
+ * Copyright 2006-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
26
26
import org .springframework .batch .item .ItemWriter ;
27
27
28
28
/**
29
- * Marks a method to be called after an item is passed to an {@link ItemWriter} <br>
29
+ * Marks a method to be called after an item is passed to an {@link ItemWriter}.
30
+ * Note that this annotation takes a {@link List} because Spring Batch
31
+ * generally processes a group of items (for the sake of efficiency).<br>
30
32
* <br>
31
33
* Expected signature: void afterWrite({@link List}<? extends S> items)
32
- *
34
+ *
33
35
* @author Lucas Ward
34
36
* @since 2.0
35
37
* @see ItemWriteListener
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2006-2007 the original author or authors.
2
+ * Copyright 2006-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
29
29
30
30
/**
31
31
* Marks a method to be called before a {@link Job} is executed, which comes
32
- * after a {@link JobExecution} is created and persisted, but before the first
32
+ * after a {@link JobExecution} is created and persisted but before the first
33
33
* {@link Step} is executed. <br>
34
34
* <br>
35
35
* Expected signature: void beforeJob({@link JobExecution} jobExecution)
36
- *
36
+ *
37
37
* @author Lucas Ward
38
38
* @since 2.0
39
39
* @see JobExecutionListener
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2006-2007 the original author or authors.
2
+ * Copyright 2006-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
27
27
28
28
/**
29
29
* Marks a method to be called before a {@link Step} is executed, which comes
30
- * after a {@link StepExecution} is created and persisted, but before the first
30
+ * after a {@link StepExecution} is created and persisted but before the first
31
31
* item is read. <br>
32
32
* <br>
33
33
* Expected signature: void beforeStep({@link StepExecution} stepExecution)
34
- *
34
+ *
35
35
* @author Lucas Ward
36
36
* @since 2.0
37
37
* @see StepExecutionListener
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2006-2007 the original author or authors.
2
+ * Copyright 2006-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
26
26
import org .springframework .batch .item .ItemWriter ;
27
27
28
28
/**
29
- * Marks a method to be called before an item is passed to an {@link ItemWriter} <br>
29
+ * Marks a method to be called before an item is passed to an {@link ItemWriter}. <br>
30
30
* <br>
31
31
* Expected signature: void beforeWrite({@link List}<? extends S> items)
32
- *
32
+ *
33
33
* @author Lucas Ward
34
34
* @since 2.0
35
35
* @see ItemWriteListener
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2006-2007 the original author or authors.
2
+ * Copyright 2006-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
26
26
27
27
/**
28
28
* Marks a method to be called if an exception is thrown by an
29
- * {@link ItemProcessor} <br>
29
+ * {@link ItemProcessor}. <br>
30
30
* <br>
31
31
* Expected signature: void onProcessError(T item, {@link Exception} e)
32
- *
32
+ *
33
33
* @author Lucas Ward
34
34
* @since 2.0
35
35
* @see ItemProcessListener
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2008 the original author or authors.
2
+ * Copyright 2002-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
25
25
26
26
/**
27
27
* Marks a method to be called if an exception is thrown by an
28
- * {@link ItemReader} <br>
28
+ * {@link ItemReader}. <br>
29
29
* <br>
30
30
* Expected signature: void onReadError({@link Exception} ex)
31
- *
31
+ *
32
32
* @author Lucas Ward
33
33
* @since 2.0
34
34
* @see ItemReadListener
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2006-2007 the original author or authors.
2
+ * Copyright 2006-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
29
29
* thrown in the {@link ItemProcessor}.<br>
30
30
* <br>
31
31
* Expected signature: void onSkipInProcess(T item, {@link Throwable} t)
32
- *
32
+ *
33
33
* @author Lucas Ward
34
34
* @since 2.0
35
35
* @see SkipListener
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2006-2007 the original author or authors.
2
+ * Copyright 2006-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
26
26
27
27
/**
28
28
* Marks a method to be called when an item is skipped due to an exception
29
- * thrown in the {@link ItemReader} <br>
29
+ * thrown in the {@link ItemReader}. <br>
30
30
* <br>
31
31
* Expected signature: void onSkipInRead({@link Throwable} t)
32
- *
32
+ *
33
33
* @author Lucas Ward
34
34
* @since 2.0
35
35
* @see SkipListener
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2006-2007 the original author or authors.
2
+ * Copyright 2006-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
27
27
28
28
/**
29
29
* Marks a method to be called if an exception is thrown by an
30
- * {@link ItemWriter} <br>
30
+ * {@link ItemWriter}. Note that this annotation takes a {@link List}
31
+ * because Spring Batch generally processes a group of items
32
+ * (for the sake of efficiency).<br>
31
33
* <br>
32
34
* Expected signature: void onWriteError({@link Exception} exception,
33
35
* {@link List}<? extends S> items)
34
- *
36
+ *
35
37
* @author Lucas Ward
36
38
* @since 2.0
37
39
* @see ItemWriteListener
40
42
@ Target ({ElementType .METHOD })
41
43
public @interface OnWriteError {
42
44
43
- }
45
+ }
You can’t perform that action at this time.
0 commit comments