Package com.unboundid.util
Class CloseableReadWriteLock.WriteLock
- java.lang.Object
-
- com.unboundid.util.CloseableReadWriteLock.WriteLock
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Enclosing class:
- CloseableReadWriteLock
public final class CloseableReadWriteLock.WriteLock extends java.lang.Object implements java.io.Closeable
This class provides aCloseableimplementation that may be used to unlock aCloseableReadWriteLock's write lock via Java's try-with-resources facility.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidavoidCompilerWarning()This method does nothing.voidclose()Unlocks the associated lock.
-
-
-
Method Detail
-
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 theCloseableobject inside the try block.
-
close
public void close()
Unlocks the associated lock.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-