Interface StaleStateMapper

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 StaleStateMapper

Maps a stale-state failure reported while checking a JDBC batch result.

A mapper is associated with one row as it is added to a GroupedBatch. If row-count verification for that row throws a StaleStateException, the batch invokes this mapper before propagating the failure.

Returning null means the stale-state condition was handled and should not be propagated. Returning an exception means the batch should throw that exception instead of the original stale-state exception. Implementations may return the supplied exception unchanged when no translation is needed.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    map(StaleStateException staleStateException)
    Map, replace, or suppress a stale-state exception for the associated batch row.
  • Method Details

    • map

      Map, replace, or suppress a stale-state exception for the associated batch row.
      Parameters:
      staleStateException - the stale-state exception raised by row-count verification
      Returns:
      the exception to throw, or null to suppress the stale-state failure