Class SafeStmtPtr

java.lang.Object
org.sqlite.core.SafeStmtPtr

public class SafeStmtPtr extends Object
A class for safely wrapping calls to a native pointer to a statement, ensuring no other thread has access to the pointer while it is run
  • Field Details

    • db

      private final DB db
    • ptr

      private final long ptr
    • closed

      private volatile boolean closed
    • closedRC

      private int closedRC
    • closeException

      private SQLException closeException
  • Constructor Details

    • SafeStmtPtr

      public SafeStmtPtr(DB db, long ptr)
      Construct a new Safe Pointer Wrapper to ensure a pointer is properly handled
      Parameters:
      db - the database that made this pointer. Always locked before any safe run function is executed to avoid deadlocks
      ptr - the raw pointer
  • Method Details