Interface SafeRunnable


public interface SafeRunnable
A functional interface that can be used to run code that may throw an exception. This interface is used when defining a transaction context.

If an exception is thrown while running the code, the transaction will be rolled back.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    run()
    The code inside the transaction that may throw an exception.
  • Method Details

    • run

      void run() throws Exception
      The code inside the transaction that may throw an exception.
      Throws:
      Exception - If an error occurs while running the code.