@Override public Exception getException(String msg, RuntimeException cause, Throwable e) throws Exception { return new SkipListenerFailedException(msg, cause, e); }
/** * Convenience method for calling process skip policy, so that it can be * called from multiple places. * * @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); } }
/** * Convenience method for calling process skip listener, so that it can be * called from multiple places. * * @param item the item that is skipped * @param e the cause of the skip */ private void callProcessSkipListener(I item, Throwable e) { try { getListener().onSkipInProcess(item, e); } catch (RuntimeException ex) { throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e); } }
@Override public void postProcess(StepContribution contribution, Chunk<I> chunk) { for (Exception e : chunk.getErrors()) { try { getListener().onSkipInRead(e); } catch (RuntimeException ex) { throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e); } } }
private void callSkipListeners(final Chunk<I> inputs, final Chunk<O> outputs) { for (SkipWrapper<I> wrapper : inputs.getSkips()) { I item = wrapper.getItem(); if (item == null) { continue; } Throwable e = wrapper.getException(); callProcessSkipListener(item, e); } for (SkipWrapper<O> wrapper : outputs.getSkips()) { Throwable e = wrapper.getException(); try { getListener().onSkipInWrite(wrapper.getItem(), e); } catch (RuntimeException ex) { throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e); } } // Clear skips if we are possibly going to process this chunk again outputs.clearSkips(); inputs.clearSkips(); }
/** * Convenience method for calling process skip policy, so that it can be * called from multiple places. * * @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 (RuntimeException ex) { throw new SkipListenerFailedException("Fatal exception in SkipPolicy.", ex, e); } }
/** * Convenience method for calling process skip policy, so that it can be * called from multiple places. * * @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); } }
/** * Convenience method for calling process skip policy, so that it can be * called from multiple places. * * @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); } }
/** * Convenience method for calling process skip policy, so that it can be * called from multiple places. * * @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); } }
/** * Convenience method for calling process skip listener, so that it can be * called from multiple places. * * @param item the item that is skipped * @param e the cause of the skip */ private void callProcessSkipListener(I item, Throwable e) { try { getListener().onSkipInProcess(item, e); } catch (RuntimeException ex) { throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e); } }
/** * Convenience method for calling process skip listener, so that it can be * called from multiple places. * * @param item the item that is skipped * @param e the cause of the skip */ private void callProcessSkipListener(I item, Throwable e) { try { getListener().onSkipInProcess(item, e); } catch (RuntimeException ex) { throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e); } }
/** * Convenience method for calling process skip listener, so that it can be * called from multiple places. * * @param item the item that is skipped * @param e the cause of the skip */ private void callProcessSkipListener(I item, Throwable e) { try { getListener().onSkipInProcess(item, e); } catch (RuntimeException ex) { throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e); } }
/** * Convenience method for calling process skip listener, so that it can be * called from multiple places. * * @param item the item that is skipped * @param e the cause of the skip */ private void callProcessSkipListener(I item, Throwable e) { try { getListener().onSkipInProcess(item, e); } catch (RuntimeException ex) { throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e); } }
@Override public void postProcess(StepContribution contribution, Chunk<I> chunk) { for (Exception e : chunk.getErrors()) { try { getListener().onSkipInRead(e); } catch (RuntimeException ex) { throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e); } } }
@Override public void postProcess(StepContribution contribution, Chunk<I> chunk) { for (Exception e : chunk.getErrors()) { try { getListener().onSkipInRead(e); } catch (RuntimeException ex) { throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e); } } }
@Override public void postProcess(StepContribution contribution, Chunk<I> chunk) { for (Exception e : chunk.getErrors()) { try { getListener().onSkipInRead(e); } catch (RuntimeException ex) { throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e); } } }
@Override public void postProcess(StepContribution contribution, Chunk<I> chunk) { for (Exception e : chunk.getErrors()) { try { getListener().onSkipInRead(e); } catch (RuntimeException ex) { throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e); } } }
private void callSkipListeners(final Chunk<I> inputs, final Chunk<O> outputs) { for (SkipWrapper<I> wrapper : inputs.getSkips()) { I item = wrapper.getItem(); if (item == null) { continue; } Throwable e = wrapper.getException(); callProcessSkipListener(item, e); } for (SkipWrapper<O> wrapper : outputs.getSkips()) { Throwable e = wrapper.getException(); try { getListener().onSkipInWrite(wrapper.getItem(), e); } catch (RuntimeException ex) { throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e); } } // Clear skips if we are possibly going to process this chunk again outputs.clearSkips(); inputs.clearSkips(); }
private void callSkipListeners(final Chunk<I> inputs, final Chunk<O> outputs) { for (SkipWrapper<I> wrapper : inputs.getSkips()) { I item = wrapper.getItem(); if (item == null) { continue; } Throwable e = wrapper.getException(); callProcessSkipListener(item, e); } for (SkipWrapper<O> wrapper : outputs.getSkips()) { Throwable e = wrapper.getException(); try { getListener().onSkipInWrite(wrapper.getItem(), e); } catch (RuntimeException ex) { throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e); } } // Clear skips if we are possibly going to process this chunk again outputs.clearSkips(); inputs.clearSkips(); }
private void callSkipListeners(final Chunk<I> inputs, final Chunk<O> outputs) { for (SkipWrapper<I> wrapper : inputs.getSkips()) { I item = wrapper.getItem(); if (item == null) { continue; } Throwable e = wrapper.getException(); callProcessSkipListener(item, e); } for (SkipWrapper<O> wrapper : outputs.getSkips()) { Throwable e = wrapper.getException(); try { getListener().onSkipInWrite(wrapper.getItem(), e); } catch (RuntimeException ex) { throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e); } } // Clear skips if we are possibly going to process this chunk again outputs.clearSkips(); inputs.clearSkips(); }