Class JdbcAdapterTest.LockWrapper

  • All Implemented Interfaces:
    java.lang.AutoCloseable
    Enclosing class:
    JdbcAdapterTest

    static class JdbcAdapterTest.LockWrapper
    extends java.lang.Object
    implements java.lang.AutoCloseable
    Acquires a lock, and releases it when closed.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.locks.Lock lock  
    • Constructor Summary

      Constructors 
      Constructor Description
      LockWrapper​(java.util.concurrent.locks.Lock lock)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      (package private) static JdbcAdapterTest.LockWrapper lock​(java.util.concurrent.locks.Lock lock)
      Acquires a lock and returns a closeable wrapper.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • lock

        private final java.util.concurrent.locks.Lock lock
    • Constructor Detail

      • LockWrapper

        LockWrapper​(java.util.concurrent.locks.Lock lock)
    • Method Detail

      • lock

        static JdbcAdapterTest.LockWrapper lock​(java.util.concurrent.locks.Lock lock)
        Acquires a lock and returns a closeable wrapper.
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable