Class AutoCloseableLock

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public final class AutoCloseableLock
    extends java.lang.Object
    implements java.io.Closeable
    A simple abstraction over ReentrantLock that can be used in conjunction with try..resources constructs.
    • Constructor Detail

      • AutoCloseableLock

        public AutoCloseableLock()
    • Method Detail

      • isHeldByCurrentThread

        public boolean isHeldByCurrentThread()
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object