Interface SkipPolicy

All Known Implementing Classes:
AlwaysSkipItemSkipPolicy, CompositeSkipPolicy, ExceptionClassifierSkipPolicy, LimitCheckingItemSkipPolicy, NeverSkipItemSkipPolicy
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SkipPolicy
Policy for determining whether or not some processing should be skipped.
Author:
Lucas Ward, Dave Syer, Mahmoud Ben Hassine, Taeik Lim
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    shouldSkip(Throwable t, long skipCount)
    Returns true or false, indicating whether or not processing should continue with the given throwable.
  • Method Details

    • shouldSkip

      boolean shouldSkip(Throwable t, long skipCount) throws SkipLimitExceededException
      Returns true or false, indicating whether or not processing should continue with the given throwable. Clients may use skipCount<0 to probe for exception types that are skippable, so implementations should be able to handle gracefully the case where skipCount<0. Implementations should avoid throwing any undeclared exceptions.
      Parameters:
      t - exception encountered while processing
      skipCount - currently running count of skips
      Returns:
      true if processing should continue, false otherwise.
      Throws:
      SkipLimitExceededException - if a limit is breached
      IllegalArgumentException - if the exception is null