Package ai.velr

Class Savepoint

java.lang.Object
ai.velr.Savepoint
All Implemented Interfaces:
AutoCloseable

public final class Savepoint extends Object implements AutoCloseable
Transaction savepoint handle.

Scoped savepoints are owned by this handle. Closing a scoped savepoint rolls back to it. Named savepoint handles refer to transaction-owned savepoints and can release or roll back that named savepoint explicitly.

  • Method Details

    • isClosed

      public boolean isClosed()
      Return whether this savepoint handle is closed or inactive.
      Returns:
      true when the savepoint can no longer be used
    • release

      public void release()
      Release this savepoint and keep changes made after it.
    • rollback

      public void rollback()
      Roll back to this savepoint and release it.
    • close

      public void close()
      Close this savepoint handle.

      Closing a scoped savepoint closes the underlying savepoint. Closing a named savepoint handle does not remove the named savepoint from the transaction.

      Specified by:
      close in interface AutoCloseable