Class ClosableLock

java.lang.Object
java.util.concurrent.locks.ReentrantLock
org.mariadb.jdbc.client.util.ClosableLock
All Implemented Interfaces:
Serializable, AutoCloseable, Lock

public final class ClosableLock extends ReentrantLock implements AutoCloseable
Utility class to permit use AutoClosable, ensuring proper lock release.
See Also:
  • Field Details

  • Constructor Details

    • ClosableLock

      public ClosableLock()
  • Method Details

    • closeableLock

      public ClosableLock closeableLock()
      Default constructor, retaining lock.
      Returns:
      Closable lock
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable