Interface Cleanable

All Superinterfaces:
AutoCloseable
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 Cleanable extends AutoCloseable
Cleans up some JDBC resource e.g. after completing execution of a SQL statement. Arguments, mappers, and other Jdbi interface implementations that allocate database resources should register a Cleanable to ensure that resources are freed after database operations are completed.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Cleanable
    A cleanable that does nothing.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    default void
    Cleans the underlying resource and appends possible exceptions to the given Throwable.
  • Field Details

    • NO_OP

      static final Cleanable NO_OP
      A cleanable that does nothing.
      Since:
      3.43.0
  • Method Details