Class CloseableReadWriteLock.WriteLock

java.lang.Object
com.unboundid.util.CloseableReadWriteLock.WriteLock
All Implemented Interfaces:
Closeable, AutoCloseable
Enclosing class:
CloseableReadWriteLock

public final class CloseableReadWriteLock.WriteLock extends Object implements Closeable
This class provides a Closeable implementation that may be used to unlock a CloseableReadWriteLock's write lock via Java's try-with-resources facility.
  • Method Details

    • avoidCompilerWarning

      public void avoidCompilerWarning()
      This method does nothing. However, calling it inside a try block when used in the try-with-resources framework can help avoid a compiler warning that the JVM will give you if you don't reference the Closeable object inside the try block.
    • close

      public void close()
      Unlocks the associated lock.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable