Interface ResourceLock

    • Method Detail

      • acquire

        ResourceLock acquire()
                      throws java.lang.InterruptedException
        Acquire this resource lock, potentially blocking.
        Returns:
        this lock so it can easily be used in a try-with-resources statement.
        Throws:
        java.lang.InterruptedException - if the calling thread is interrupted while waiting to acquire this lock
      • release

        void release()
        Release this resource lock.
      • close

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