List of usage examples for org.springframework.batch.core.step.skip SkipPolicy shouldSkip
boolean shouldSkip(Throwable t, int skipCount) throws SkipLimitExceededException;
From source file:org.springframework.batch.core.jsr.step.item.JsrFaultTolerantChunkProcessor.java
/** * Convenience method for calling process skip policy. * * @param policy the skip policy/* ww w. j av a2 s.c o m*/ * @param e the cause of the skip * @param skipCount the current skip count */ private boolean shouldSkip(SkipPolicy policy, Throwable e, int skipCount) { try { return policy.shouldSkip(e, skipCount); } catch (SkipException ex) { throw ex; } catch (RuntimeException ex) { throw new SkipPolicyFailedException("Fatal exception in SkipPolicy.", ex, e); } }
From source file:org.springframework.batch.core.step.item.FaultTolerantChunkProcessor.java
/** * Convenience method for calling process skip policy, so that it can be * called from multiple places.// w w w .j a v a 2 s.c om * * @param policy the skip policy * @param e the cause of the skip * @param skipCount the current skip count */ private boolean shouldSkip(SkipPolicy policy, Throwable e, int skipCount) { try { return policy.shouldSkip(e, skipCount); } catch (SkipLimitExceededException ex) { throw ex; } catch (RuntimeException ex) { throw new SkipListenerFailedException("Fatal exception in SkipPolicy.", ex, e); } }