Update docs with expected behaviour in regards to skippable exceptions
Before this commit, the expected behaviour when a skippbale exception occurs in a fault tolerant chunk-oriented step was not documented in details. This commit update the docs and adds a sample for each case (when a skippable exception occurs during read, process and write). Resolves BATCH-2541
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2018 the original author or authors.
|
||||
* Copyright 2006-2019 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.
|
||||
@@ -344,7 +344,10 @@ public class FaultTolerantStepBuilder<I, O> extends SimpleStepBuilder<I, O> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Explicitly request certain exceptions (and subclasses) to be skipped.
|
||||
* Explicitly request certain exceptions (and subclasses) to be skipped. These
|
||||
* exceptions (and their subclasses) might be thrown during any phase of the chunk
|
||||
* processing (read, process, write) but separate counts are made of skips on
|
||||
* read, process and write inside the step execution.
|
||||
*
|
||||
* @param type the exception type.
|
||||
* @return this for fluent chaining
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 the original author or authors.
|
||||
* Copyright 2006-2019 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.
|
||||
@@ -20,6 +20,7 @@ package org.springframework.batch.core.step.skip;
|
||||
*
|
||||
* @author Lucas Ward
|
||||
* @author Dave Syer
|
||||
* @author Mahmoud Ben Hassine
|
||||
*/
|
||||
public interface SkipPolicy {
|
||||
|
||||
@@ -31,7 +32,7 @@ public interface SkipPolicy {
|
||||
* {@code skipCount<0}. Implementations should avoid throwing any
|
||||
* undeclared exceptions.
|
||||
*
|
||||
* @param t exception encountered while reading
|
||||
* @param t exception encountered while processing
|
||||
* @param skipCount currently running count of skips
|
||||
* @return true if processing should continue, false otherwise.
|
||||
* @throws SkipLimitExceededException if a limit is breached
|
||||
|
||||
@@ -841,6 +841,9 @@
|
||||
are declared as included take precedence over the same value if it is also excluded.
|
||||
Exceptions that are already marked as no-rollback
|
||||
are automatically skippable (but it doesn't hurt to add them again here).
|
||||
Exceptions (and their subclasses) that are declared might be thrown
|
||||
during any phase of the chunk processing (read, process, write) but separate counts
|
||||
are made of skips on read, process and write inside the step execution.
|
||||
]]>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
Reference in New Issue
Block a user