BATCH-985: Added documentation describing SkipListener behavior, also updated the incorrect javadoc.
This commit is contained in:
@@ -18,6 +18,10 @@ package org.springframework.batch.core;
|
||||
/**
|
||||
* Interface for listener to skipped items. Callbacks will be called by
|
||||
* {@link Step} implementations at the appropriate time in the step lifecycle.
|
||||
* Implementers of this interface should not assume that any method will be
|
||||
* called immediately after an error has been encountered. Because there
|
||||
* may be errors later on in processing the chunk, this listener will not be
|
||||
* called until just before committing.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @author Robert Kasanicky
|
||||
@@ -28,7 +32,8 @@ public interface SkipListener<T,S> extends StepListener {
|
||||
/**
|
||||
* Callback for a failure on read that is legal, so is not going to be
|
||||
* re-thrown. In case transaction is rolled back and items are re-read, this
|
||||
* callback will occur repeatedly for the same cause.
|
||||
* callback will occur repeatedly for the same cause. This will only happen
|
||||
* if read items are not buffered.
|
||||
*
|
||||
* @param t cause of the failure
|
||||
*/
|
||||
@@ -36,10 +41,7 @@ public interface SkipListener<T,S> extends StepListener {
|
||||
|
||||
/**
|
||||
* This item failed on write with the given exception, and a skip was called
|
||||
* for. The callback occurs immediately after the item is marked for
|
||||
* skipping and is called only once for the same item, regardless of
|
||||
* rollbacks (chunk may be re-processed several times or the exception on
|
||||
* write may not cause rollback at all).
|
||||
* for.
|
||||
*
|
||||
* @param item the failed item
|
||||
* @param t the cause of the failure
|
||||
@@ -48,10 +50,7 @@ public interface SkipListener<T,S> extends StepListener {
|
||||
|
||||
/**
|
||||
* This item failed on processing with the given exception, and a skip was called
|
||||
* for. The callback occurs immediately after the item is marked for
|
||||
* skipping and is called only once for the same item, regardless of
|
||||
* rollbacks (chunk may be re-processed several times or the exception on
|
||||
* write may not cause rollback at all).
|
||||
* for.
|
||||
*
|
||||
* @param item the failed item
|
||||
* @param t the cause of the failure
|
||||
|
||||
Reference in New Issue
Block a user