Class WebAuthnJDBCAcceleratorImpl.ConnectionWithLock

java.lang.Object
net.shibboleth.idp.plugin.authn.webauthn.storage.impl.WebAuthnJDBCAcceleratorImpl.ConnectionWithLock
All Implemented Interfaces:
AutoCloseable
Enclosing class:
WebAuthnJDBCAcceleratorImpl

protected class WebAuthnJDBCAcceleratorImpl.ConnectionWithLock extends Object implements AutoCloseable
A Class to encapsulate a Connection protected by an optional read/write lock. Because the class implements AutoCloseable the unlock can "just happen"
  • Field Details

    • connection

      @Nonnull private final Connection connection
      The connection we set up.
    • threadLock

      @Nullable private final Lock threadLock
      The lock we may or may not have set up.
    • isAutoCommit

      private final boolean isAutoCommit
      Was this created autocommit?
    • isCommited

      private boolean isCommited
      Has commit() been called?
    • isRolledBack

      private boolean isRolledBack
      Has rollback() been called?
  • Constructor Details

    • ConnectionWithLock

      public ConnectionWithLock(boolean autoCommit, boolean writeLock) throws SQLException
      Constructor.
      Parameters:
      autoCommit - What to set Connection.setAutoCommit(boolean) to
      writeLock - Whether to grab an write lock on the table (if we are locking)
      Throws:
      SQLException - if any of the SQL operations throw one
  • Method Details