diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/AsyncItemProcessor.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/AsyncItemProcessor.java index a90af2f51..371ddc2ae 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/AsyncItemProcessor.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/AsyncItemProcessor.java @@ -33,11 +33,19 @@ import org.springframework.util.Assert; * background. To allow for background processing the return value from the * processor is a {@link Future} which needs to be unpacked before the item can * be used by a client. + * + * Because the {@link Future} is typically unwrapped in the {@link ItemWriter}, + * there are lifecycle and stats limitations (since the framework doesn't know + * what the result of the processor is). While not an exhaustive list, things like + * {@link StepExecution#filterCount} will not reflect the number of filtered items + * and {@link org.springframework.batch.core.ItemProcessListener#onProcessError(Object, Exception)} + * will not be called. * * @author Dave Syer * * @param the input object type * @param the output object type (will be wrapped in a Future) + * @see AsyncItemWriter */ public class AsyncItemProcessor implements ItemProcessor>, InitializingBean {